Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Valid values in varoables (TEB's)

New Here ,
Feb 27, 2019 Feb 27, 2019

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?

242
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2019 Feb 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...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 27, 2019 Feb 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 27, 2019 Feb 27, 2019

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 27, 2019 Feb 27, 2019
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources