Hi all, I am having the darndest time trying to figure out a math formatting issue.
I have two global variables, in which I store the value of a repeater text object. I am trying to update the text of another widget with the values of my two global variables added together and set to two decimal places.
Here is the expression:
Flight total: €[[(leg1Total + leg2Total).toFixed(2)]]
This always equates to a NaN value
When I remove the ( ) around the two variables in the expression:
Flight total: €[[leg1Total + leg2Total.toFixed(2)]]
I get a number but it has two sets of decimal places and evaluates to “Flight total: €2,458.010.00”
Both variables are numbers with 2 decimal places and I end up with this wacky number that has two sets of decimal places.
What am I doing wrong here?