Setting text in a global script

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Pnirff
Ebase User
Posts: 21
Joined: Fri Jan 25, 2013 8:36 am

Setting text in a global script

#1

Postby Pnirff » Thu Jan 08, 2015 10:44 am

Hello,

I have developed a global script which will get the page and controlname like
script(char p_sPage, char p_sCtrl).

Now i hide the control in the script with
interpret 'hide ' + p_sCtrl+ ' on ' + p_sPage;

works fine. How can I set text with the same technique.

interpret 'set ' + sWelcome + '.text = \'Bla\'' + ' on ' + p_sPageName;;
Will not work, cause there is no on page clause in a set.

a
"interpret 'set ' + sWelcome + '.text = \'Bla\'';" (without on page) will lead to the error:

Script EXECUTEREFRESHLINK: Invalid fieldname

because the global script is called from another page.

Can someone help me?

Cheers
Pnirff
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Thu Jan 08, 2015 1:48 pm

With FPL you can only change a text using its text reference id - double click on any text and you'll see this at the bottom of the screen. So your command would be something like:

Code: Select all

set text TXT212 = 'new text';
You could make this into a global script like this:

Code: Select all

script(char textref, char text)
interpret 'set text ' + textref + '= \'' + text + '\'';
but I'm not sure it's worth the effort.

With the Javascript scripting language (available from Ebase V4.4) , you have many more possibilities.
0 x


Who is online

Users browsing this forum: No registered users and 22 guests