Computing and displaying an Integer value.

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

arunkumar
Ebase User
Posts: 14
Joined: Wed Jul 29, 2015 12:53 pm

Computing and displaying an Integer value.

#1

Postby arunkumar » Mon Sep 07, 2015 12:44 pm

Hi,

I was going through the basic tutorial and there is a sample script given " controls.text1.text.text = 'Welcome ' + fields.FIRST_NAME.value; " this works fine for characters but when i need to display a integer value in the same text 1 location it is not possible ,The script which i used is " set text1.text='TEXT1 WITH NUMBER'+NUM1; " where NUM1 is an integer value.

If there is any link which i can read to understand this scripting is available please share it.
0 x

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

#2

Postby Jon » Mon Sep 07, 2015 2:36 pm

This should work OK:

Code: Select all

controls.text1.text.text='TEXT1 WITH NUMBER'+NUM1;
..but not:

Code: Select all

set controls.text1.text.text='TEXT1 WITH NUMBER'+NUM1;
the "set" is not valid when using Javascript.

For documentation, press F1 in the script editor - there are a number of documents available. Or click here http://dev-docs.verj.io/ufs/doc/Javascr ... ipting.htm.

Ebase Xi includes 2 scripting languages Javascript and FPL and you can use either.
  • o The Javascript language is a standard and you can find lots of documentation/books etc online; Ebase Xi supplies an API that provides access to fields, controls, pages etc from Javascript. This documentation is provided via the link above.
    o The FPL language is proprietary to Ebase and you can find the documentation by pressing F1 in the FPL script editor or by clicking here http://dev-docs.verj.io/ufs/doc/script_ ... syntax.htm
If you don't know which language to use, we recommend Javascript.
0 x

arunkumar
Ebase User
Posts: 14
Joined: Wed Jul 29, 2015 12:53 pm

#3

Postby arunkumar » Wed Sep 09, 2015 11:03 am

I used the same code that you have given but it is still showing error "

Code: Select all

 Script FIRST_SCRIPT: Invalid SET expression controls.text2.text='TEXT2 WITH NUMBER'+NUM1 - Script FIRST_SCRIPT: Error evaluating expression 'TEXT2 WITH NUMBER'+NUM1 - Invalid parameter type
.
0 x

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

#4

Postby Jon » Wed Sep 09, 2015 12:01 pm

I think this is because you are using an FPL script. This syntax applies to a Javascript script.
0 x


Who is online

Users browsing this forum: No registered users and 11 guests