Skip to main content
Known Participant
February 27, 2019
Question

Valid values in varoables (TEB's)

  • February 27, 2019
  • 2 replies
  • 301 views

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?

    This topic has been closed for replies.

    2 replies

    Inspiring
    February 27, 2019

    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).

    Lilybiri
    Legend
    February 27, 2019

    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...

    mhhwnAuthor
    Known Participant
    February 27, 2019

    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.

    Lilybiri
    Legend
    February 27, 2019

    Hmmm, that works for me. How did you set up the action?