Copy link to clipboard
Copied
Hi,
i have a advanced function that validates user inputs inside different TEB's.
The right value at one of the TEB's should be "060" and if its typed in right, a icon should be displayed. Problem is that the value will not validate correctly. I have a few more TEB's were the right values start with "0" (016, 0500) and they are also not validated correctly. Does Captivate variables misinterpret the "0" infront of numbers?
Copy link to clipboard
Copied
The way numeric values are treated in Captivate can be weird indeed, since you cannot define the type of the variable (number or string).
I cannot explain, but only offer a workaround which I always use in this case: put the correct number in a snother user variable and use that one in the condition. Probably switching to JS would be a better solution, but I am bit lazy...
Copy link to clipboard
Copied
I've tried it and it didn't work, but i've chosen "60" as value now and if i type in "060" it is displayed as correct. Think i can work with that.
It seems that Captivate totally ignores the first zero. I also have a TEB with the right value "000", if the TEB is empty it is displayed as correct aswell.
Copy link to clipboard
Copied
Hmmm, that works for me. How did you set up the action?
Copy link to clipboard
Copied
Lilybiri is correct - you would need to use JS to validate any number starting with a zero, or any number with a decimal point and ending with a zero (e.g., 6.50).