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

Question

Question

Pattern Matching and Workflow Conditional Routing

asked on July 17, 2017 Show version history

I'm using some pattern matching to obtain the either one or two digit month code of a date field.  (i.e. 7 for July, 11 for November).  It should be based on the current date.  So today's date for example would be 7/17/2017.

 

The pattern matching regular expression I'm using is: (\d{1,2})/

 

I'm later using the Pattern Matching result in as a token for later conditional routing.

When running a workflow with a token of today's date, 7/17/2017, I'm getting the following conditional results:

 

Does workflow's pattern matching read the 7 as text, and there by count it as being a greater value than the number 10?  Or is there something I'm missing, settings-wise?  If any more info is needed, certainly let me know.

 

Thanks

Workflow Designer Version 10.2.0.216

0 0

Answer

SELECTED ANSWER
replied on July 17, 2017

Hi Evan,

I can't say for sure if Workflow's pattern matching returns a string, but that would be my guess.

Have you tried retrieving the date/month using date formatting? I've had success with the following:

~Rob

1 0
replied on July 17, 2017

Ultimately this is substantially a better solution that what I was trying to do with the pattern matching and workflow conditional routing.  

 

Thanks Rob!

1 0
replied on July 17, 2017

They're sorted as strings, not numbers. Rob's solution works, you can use it in Assign Tokens where you can also set the type of the value to integer to make it really explicit.

1 0
replied on July 18, 2017

Thanks for the reminder re: setting token type!

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