Is there an easier way to convert a payment choice into a number?
OK - I have a choice field that lets you select 29.97 or 39.97 or 49.97 I then have a formular field that contains code:
if 'Chose Payment Amount' = 1 then
29.97
else
if 'Chose Payment Amount' = 2 then
39.97
else
if 'Chose Payment Amount' = 3 then
49.97
end
end
end
So I could then use the result in that field in other numeric calculations - is there a more direct way of taking the value from a choice field?
Thanks.
6 replies
-
Hi Sean,
Thanks, but I can't get it to work - have tried formula variations in Choose Payment Amount, Value is, and VALUE 2 fields - the best I get is "undfined" in Value is - Where should the formula go?
-
let n := number(text('Chose Payment Amount'));
n
-
Oh how strange - now it's working with number(text('Chose Payment Amount')) in the formula field???
-
Yes, it goes in the Formula field and you use it by itself without the if-then-else statements. It should be the only line of code in the formula field and it shouldn't be necessary to assign the value to a variable.
-
Thanks Sean.
Content aside
- 4 yrs agoLast active
- 6Replies
- 899Views