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

Question

Question

Confused by Workflow Regular Expression Condition Evaluating True

asked on December 23, 2024 Show version history

I have a workflow that I have been troubleshooting today because a value isn't evaluating the way I believe it should be and I a stumped. The workflow is retrieving values from a Laserfiche Forms multi-line field and then uses regular expressions to parse out the various lines. All of this works great.

The next part of the workflow has a conditional decision where one of the branches is configured to evaluate whether the value matches a regular expression and doesn't match another. This is the part that I don't understand why it is evaluating True for the first condition. You can see in this screenshot how it is doing it.

Any idea why the first condition is evaluating true?

We are using Workflow 11.0.2306.898.

0 0

Answer

APPROVED ANSWER
replied on December 23, 2024

Hi Blake,

For the first condition, are you trying to check if the number is only 1 to 3 digits? If yes, please try the regular expression ^\d{1,3}$.

The first condition was evaluated as true, since the string contains 1~3 digits there.

0 0
replied on December 24, 2024

Thank you, Juan. I was thinking that what I had would evaluate as a minimum of 1 digit and a maximum of 3 digits.

0 0
replied on January 6

It does, but your expression does not have any requirements on the string being only 1-3 digits, it's the equivalent of "it should have 1 to 3 digits (and possibly other stuff)" rather than "it must be 1 to 3 digits (and nothing else)".

 

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.