Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
I would like to take an input string and check if it matches any expression in a DataTable of expressions.
For example, if the input string is "SomeError1", and the expressions in the DataTable are:
"SomeError.*"
"SomeOtherError.*"
".*Error"
I want to query if the input string matches any of the expressions in the table. In this case, it would match "SomeError.*".
I've tried querying the DataTable entries with LIKE and Matches queries:
"filters": {
"type": "Matches",
"fieldName": "item",
"expression": "SomeError1"
}
"filters": {
"type": "LIKE",
"fieldName": "item",
"value": "SomeError1"
}
but it only returns a result if the value/expression field is the expression.
Is there any way to accomplish this?
Thanks!
Perhaps you can add a wild card to your search: When using LIKE/NOTLIKE you need to add your own Wild Cards (% or * or ? for a single character wild card). For example to find ThingWorx use LIKE Th%
Thanks for the reply, but I'm trying to do the opposite. The search string is the full string and I want to check if it matches any expression (with wildcards) in the table.
I don't think there is a set query for that, you probably have to loop through your table and just execute a javascript search