Source language: Translate to:

Aliasing Text Entry Variable

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Aliasing Text Entry Variable

Postby Wrangler » Tue Aug 21, 2007 10:19 am

I have 12 buttons that open 1 container, which has 2 input boxes in it. Each button needs to connect to the correctly numbered table: ie. basement1, basement2, etc.

Problem is I can't figure a way to use the same container for all the tables. I tried this:

SetVar "[baseno]" "1" in button 1.

For the text enty variable:

[rvcompanion.basement[baseno].binnum]

This doesn't work. Didn't work in NeoDB either.

In the previous and next buttons etc. this works:

dbpnext "rvcompanion" "basement[baseno]"

So, I guess my question is how I would make this work without creating 12 containers, each using [rvcompanion.basement1.binnum], [rvcompanion.basement2.binnum] etc.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby Neosoft Support » Tue Aug 21, 2007 11:45 am

You can't use compound variables with text entry fields.

To do what you want you will need to use generic variables for your text entry fields. For example:

[Field1]
[Field2]

Then assign the data to those fields using the database's on change action. For example:

:DBOnChange
SetVar "[Field1]" "[rvcompanion.basement[baseno].binnum]"
SetVar "[Field2]" "[rvcompanion.basement[baseno].whatever]"
Return

Finally, to record edits made by the user you will either need to manually SetVar the generic variables back into the database variables or add code to the text entry field's TextChange actions. For example:

SetVar "[rvcompanion.basement[baseno].binnum]" "[Field1]"
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Wrangler » Tue Aug 21, 2007 12:20 pm

Thanks, Dave. I can make that work.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1506
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: No registered users and 1 guest