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

Question

Question

Pattern Matching Workflow - Data type mismatch in criteria expression

asked on April 9, 2014

Encountering a "Data type mismatch in criteria expression" when querying data from the Excel sheet. The sheet contains several columns including an index # column which is used as the key. The index has the following values:

12.34

12.34.56

12.34.56.78

1.2.3, etc

 

When data is queried and the value is 12.34 or 1.2, the value is returned. But if the queried value is 12.34.56, the above error message is encountered. So any query (lookup) for index number with more than a single period returns the error. This is Laserfiche Server & Worklfow 9.1.

 

The patter matching is shown here below. Any ideas?


 

 

0 0

Replies

replied on April 9, 2014 Show version history

In the pattern you posted, I'm seeing an unescaped period after the first "(\d\d", which becomes a wildcard accepting any value, and you have an escaped close parenthesis which I think is supposed to be an escaped period. A regular expression to match what you are doing would be:

 

(Edit: changed regex because I didn't notice that you could have any number of periods, thought it was only one or two. If you have situations with no periods, change the second + to a *)

(\d+)(?:\.(\d+))+

One or more digits, then a period followed by one or more digits one or more times

 

That said, a regular expression may be the wrong tool for the job here. What are you trying to do? Extract the numeric items? Find the value in a string? Verify that a string is correct?

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

Sign in to reply to this post.