Highlighted

Valid values in varoables (TEB's)

New Here ,
Feb 27, 2019

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?

Views

88

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Valid values in varoables (TEB's)

New Here ,
Feb 27, 2019

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?

Views

89

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Most Valuable Participant ,
Feb 27, 2019

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 27, 2019

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.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Most Valuable Participant ,
Feb 27, 2019

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Resources
Captivate User Guide
New Group