You are viewing limited content. For full access, please sign in.

Question

Question

Exclusive Gateway throwing an error

asked on November 28, 2017

I set up the following situation:

 

-Form has 2 fields, Amount and Type

-Process has an exclusive gateway that goes to Path A if Amount>100000 or Type is "Third Party"

-Amount field is hidden so no value can be input

 

Upon a submission, it throws an error (or goes to Path B if B is set as the default path). My assumption is that this occurs because the Amount field is hidden and thus does not exist to the process, so it tries to compare 100000 to a value that doesn't exist and throws an error.

 

However, if I put quotes around 100000 in the condition for the exclusive gateway (which Forms does by default) everything works as expected with no error. But without the quotes around 100000, if the Amount field is not hidden then everything works as expected. If I put a value of 60 it correctly evaluates as less than 100000 and if I put 100001 it evaluates as more than 100000.

I'm confused as to why Forms seems to have an issue with a hidden field sometimes and no issues with it other times, and why with quotes around the number it works every time.

 

Sorry if this is confusing but this issue just came up on a client's Forms process (they had no quotes around the 100000 and the field was hidden so it went to the default path) and that's why I'm posting about it here.

0 0

Replies

replied on November 28, 2017

Not sure exactly why the quotes are making a difference, but something I would check is whether the field rule is set to "Save" or "Ignore" the data when the field is hidden.

Also, is the field a Number type, or a Single Line? That could make a difference as well.

2 0
replied on November 29, 2017

From the LF Admin Guide:

The values in number and currency fields are automatically treated as numbers when XPath statements are evaluated. If you want the value in a single line field to be evaluated as a number instead of as a string (letters), use the number() function to force the strings to numbers in number variables. For example, if "/dataset/Single_Line" is a string, you can type "/dataset/number(Single_Line)" to force the string to a number.

If you are already using a number, instead of a number variable, be sure to remove quotation marks from the value.

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.