Formatting substituted runtime values in texts

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

AJDulk
Ebase User
Posts: 94
Joined: Fri Sep 14, 2007 12:18 pm
Location: The Netherlands
Contact:

Formatting substituted runtime values in texts

#1

Postby AJDulk » Thu Sep 08, 2016 3:30 pm

From Subtituting runtime values into texts we learn that we can substitute the value of a variable into a text using the && notation. Unfortunately the substitution seems to use the raw value than the formatted value (I am using a currency in a Dutch page so would expect 10 cents to show as 0,10 instead I get 0.1).

Is there a neat method to get the formatted value rather than the raw value ( for example &&fieldName.displayString() )?
Last edited by AJDulk on Thu Sep 08, 2016 4:49 pm, edited 1 time in total.
0 x

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

#2

Postby Jon » Thu Sep 08, 2016 4:21 pm

The displayValue property of a field is what you want but you can only use this via a script e.g.

Code: Select all

controls.TXT1.text.text = "Field value is " + fields.xxxxx.displayValue;
Which is not as neat as &&variable substitution but it works.
0 x

AJDulk
Ebase User
Posts: 94
Joined: Fri Sep 14, 2007 12:18 pm
Location: The Netherlands
Contact:

Re: Formatting substituted runtime values in texts

#3

Postby AJDulk » Thu Sep 08, 2016 4:48 pm

Thanks for the info Jon, that is how I have solved it but I was hoping that there would be an easier way. Maybe this could be an enhancement for a future release?
0 x


Who is online

Users browsing this forum: No registered users and 20 guests