Recently had a need to extract a parameter from within a URL string using Nintex Workflow. Specifically, I needed to get the ID parameter from a URL. In the example URL below, I needed to extract the number 987:
Follow these steps to get the ID number:
- Open the Nintex Workflow designer and add a Regular Expression action.
- Configure the Regular Expression action with the following settings:
- Pattern = (?<=ID=)[^&]+
- Operation = Extract
- Input Text = String, Inserted Reference or Workflow Variable
- Store Result In = Collection workflow variable
- Note: Your can use the “Run Now” option in the ribbon to test out the action.
- Next add a Collection Operation Action with the following settings:
- Target Collection = Collection workflow variable
- Operation = Get
- Index = Integer workflow variable (with “Default value” = 0)
- Store Result In = Text workflow variable
- The value (987 in the example) is stored in the Text workflow variable and can be used else where within your workflow.
Leave a Reply