Source language: Translate to:

Nested variable

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Nested variable

Postby chromebandit » Sat Sep 07, 2013 11:08 pm

Hi is it posible to use Special variable table reccount like

[MyDatabaseName.[TableName].$RecCount]" ???


Regards
User avatar
chromebandit
 
Posts: 283
Joined: Wed Nov 24, 2010 5:00 pm

Re: Nested variable

Postby Gaev » Sun Sep 08, 2013 5:09 am

chromebandit:

Yes it is ... as is [[dbVariable].[tableVariable].[fieldVariable]]

But I would be careful about specifying such formats as "variables associated with NeoBook Objects (widgets) ... many years ago, I thought it would be a great idea to adopt this strategy ... as it made it very easy to change the name of your Database (alias) and Table names without having to change them in all the scripts ... found out that a change in (say) [fieldVariable] did not trigger a change in the rendering of the associated NeoBook Object.
User avatar
Gaev
 
Posts: 3716
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Nested variable

Postby chromebandit » Sun Sep 08, 2013 5:19 am

Thanks Gaev - good to know.

Regards
User avatar
chromebandit
 
Posts: 283
Joined: Wed Nov 24, 2010 5:00 pm

Re: Nested variable

Postby carlos torres » Sun Sep 08, 2013 6:08 pm

Dear Chromobandit

About using variables the answer is yes.
I follow a Gaev advice many years ago

This is the field on the screen in a text box
[dBListas.LastName]

and this the routine to keep the fields update
Code: Select all
:DatabaseUpdate
        SetVar "[RecPos]" "![DbListas.[tbName].$RecNum]/[DbListas.[tbName].$RecCount]"
        ...///
        SetVar  "[dbListas.LastName]" "[dbListas.[tbName].LastName]"
        SetVar  "[dbListas.Names]" "[dbListas.[tbName].Names]"
Return


Note that [tbName] is your table name that could change at any moment specially if you have many groups with the same data structure.

hopefully it will be useful

regards
carlost
User avatar
carlos torres
 
Posts: 289
Joined: Mon May 02, 2005 8:14 am
Location: Pamplona, Colombia

Re: Nested variable

Postby chromebandit » Mon Sep 09, 2013 5:22 am

Thanks Carlos good information i try it out :)

Best Regards
User avatar
chromebandit
 
Posts: 283
Joined: Wed Nov 24, 2010 5:00 pm


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 3 guests

cron