cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Regular Expression can work with {Common:} Token, but not with {WorkflowVariable:)

Jump to solution

I tried to use the Regular Expression Action and define a Pattern.

If I want to use a "Common" Variable inside the Pattern Field, it is replaced with the actual value, before the Pattern is executed.

(\b{Common:WebUrl}\b)(?!.*\1)

 

Is transfered to 

(\bhttp://MyURl/site\b)(?!.*\1)

and then executed.

 

But When I try to use a WorkflowVariable instead:

(\b{WorkflowVariable:MyVariable}}\b)(?!.*\1)

 

It is not replaced and the Pattern is used with the {WorfklowVariable....} part.

 

Do I need to escape the {WorkflowVariable} further, or is this just not supported, and only the {Common} Tag can be replaced ?

Labels: (1)
0 Kudos
Reply
2 Replies
Highlighted
Nintex Employee
Nintex Employee

Re: Regular Expression can work with {Common:} Token, but not with {WorkflowVariable:)

Jump to solution
Hi,

I did a quick test in the latest build of Nintex Workflow 2013 and found that I could use either a workflow variable or common reference and both worked as expected.
I didnt use a URL as it was a simple test but it worked either way.
0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Regular Expression can work with {Common:} Token, but not with {WorkflowVariable:)

Jump to solution

Ok, I found the root cause.

 

As there was a condition in which the variable would not be set to a value, it could be empty.

The interesting part was, even with the variable not initialised I didn't get an exception, when Nintex tried to insert the Variable. It just used the {WorkflowVariable:MyVariable} syntax instead, and put that into the Regular Expression action.

 

So yes, the Action can take both kinds of Tokens, if there are values inside it :)

View solution in original post

0 Kudos
Reply