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

Question

Question

How do I create a condition using a 'Token' with a 'Contains' operator?

asked on August 28, 2015 Show version history

I have the existing condition that was setup by Laserfiche services:

The first condition is for a token value that contains NULL.

I changed the name of the query from 'Query Data 6' to something more relevant, and now I want to update a conditional activity that follows the query (above). However when I add a condition and choose the new name of the 'Query Name / Execution Date' token, the 'Contains' operator is missing from the list. 

I understand that some operators are dependent on the Condition Type Text, but how was this done originally if it's not available now?? I've tried switching to a Condition Type that allows Contains, then changing the Condition Type back but that didn't work.   (Workflow version is 9.0)  See below:

 

(Strangely, the Condition box in the Properties pane reflects the changed token names, but when you open them for editing it shows the originals.)

0 0

Answer

SELECTED ANSWER
replied on November 11, 2015

The "Contains" operator has been removed for multi-value tokens because the behavior is not what people expect it. Values are considered individually and not as a set, so for a token with values "ABC" and "XYZ", "contains A" is both true (because ABC contains A) and false (because XYZ does not contain A).

0 0

Replies

replied on August 31, 2015

Conditions on date values do not support the "contains" operator because we didn't see a useful case for it. Are you trying to see if the date value is empty?

0 0
replied on August 31, 2015

Yes, I'm trying to see if the date field has a value in it.

If I change it to equals NULL that would seem to achieve the same end, I just want to make sure I'm not missing something as that was the way I found it. 

With regard to the other conditions that are in place:

a) What is the difference between Is Empty and equals NULL?

b) What is reason for  the last condition? If /d* matches on zero or more occurrences of a digit, what scenario would that be trying to trap for? 

0 0
replied on August 31, 2015

\d* is "zero or more digits". You want \d+ for "1 or more". "Equals NULL" will look for the string "NULL".

The last condition should do it if you change it to \d+ (though it may still print a warning that the token does not exist).

0 0
replied on November 9, 2015

I still need a way to use the CONTAINS operator on a string token and I can't find any way to do it - even though I inherited workflows that use it!  I'm on 9.0. If this is a bug there must be a way around it but what is it?  Does anyone know the trick?? Did they edit the database?  See screenshot above for better explanation. 

 

0 0
replied on November 10, 2015

What's the exact version of your Workflow Server?

0 0
replied on November 10, 2015

Help Screen of Workflow Designer is 9.0.2.236.

Where can I find the exact version of the workflow server/ LF Server? 

0 0
replied on November 11, 2015

Update - using another Answers thread I learned I can 'flatten' the multi-value token that I want to use the Contains operator on into a comma-delimited string using the Index option of the Token Config screen. Now I can use a regex in place of Contains, and this is a good workaround. 

(I'm guessing that the reason I have workflows in place that use Contains on a token is because someone set them up with Does Not Contain and then edited the .wfi file to change them back to Contains.)

0 0
SELECTED ANSWER
replied on November 11, 2015

The "Contains" operator has been removed for multi-value tokens because the behavior is not what people expect it. Values are considered individually and not as a set, so for a token with values "ABC" and "XYZ", "contains A" is both true (because ABC contains A) and false (because XYZ does not contain A).

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

Sign in to reply to this post.