Skip to main content
Nintex Community Menu Bar

Hi all, I’m having an issue with a Regex action in a workflow that I have upgraded from Nintex for SP to NAC. The workflow looks up a user’s office and stores it in a variable, then a Regex action replaces the text with a regional code for finance purposes.

 

However, the result (varOfficeCode) is just coming out as the original input text. Am I missing something? Thanks!

Hi ​@PD,

I’m not sure why you are using a regular expression to do this, but if you want to continue in this direction, you will need to use a backslash \ to escape the special characters in the pattern.
Example: Canterbury \| Marlborough \| West Coast \| Nelson \- Tasman


Hi ​@SimonMuntz, thanks for the reply. What’s the other option if not Regex? The pipes are word separators, ie. I want to replace any of the listed regions with “2”. It works in your Regex checker and worked when the workflow was in Nintex for SP. It has just stopped working since being upgraded to NAC.

 

 


Hi ​@PD,

Thank you for clarifying the use case.
I suggest logging the input variable to see what is in it. If it is supposed to contain one of the options, your regular expression will work based on my testing.


Thanks again ​@SimonMuntz. Yep, I had logged the input variable and it was as expected. I now think the issue is that I’m running several of these Regex actions in parallel to cater for different office codes. If I disable the parallel branches it works okay. I’ll have to figure out a way around that.


Hi ​@PD,

How about creating a table in Nintex Workflow that contains all the offices and their codes?
Then all you do is query the table for the office and return its code.

More Info: https://help.nintex.com/en-US/nwc/Content/Dashboard/Tables.htm#Tables


Reply