Integration Warning: Unable to apply transform because search criteria has one or more unresolved names Follow

Avatar
Samantha Petro

Symptom

 When using one of the Search Actions in an Integration and using Regular Expressions for the search method, you receive the following warning in your logs:

regex_error.png

Environment

 BarTender 2016 Integration

Fix/Answer

BarTender uses % to denote variables in Integrations. The Command script uses two of these, %BTW% and %END%. If your Regular Expression (regex) contains two %, BarTender interprets whatever's between them as a variable and may throw a warning: "Unable to apply transform because search criteria has one or more unresolved names."

Using Wildcards

If possible, try to avoid using two %. If you must two % symbols, you can use the dot wildcard character in place of the %.

The script in the warning message above, you can remove one of the % symbols and the regex will work properly:

(%BTW[\s\S]*\/AF=")|(" \/PRN[\s\S]*)

Another example is if you have an expression like this:

(%BTW[\s\S]*END%)\u000D\u000A

BarTender believes anything between these two % symbols is a variable name, and this would be an illegal name for a variable thus the warning.

To correct this regex, you can use the dot wildcard:

(.BTW[\s\S]*END.)\u000D\u000A

Telling BarTender to not use variables

The simplest method is to uncheck the variable checkbox on the action:

strip_cmdscript10.png



Was this article helpful?

0 out of 0 found this helpful


Please sign in to leave a comment.