I have the following challenge. We have two lists Events and Participants. When creating a Participant item a lookup field has to be filled, where the Event needs to be selected. This is everything straight forward.
Then a workflow is started with every new created Participant. In the workflow I need to assign a value from the linked Event to a workflow variable.
I thought this was an easy task, because I have the ID from the Event item in my lookup field. But when I use the value in the lookup field in Nintex it is only the Title and no ID from the Event item. How can I get the ID, because I don't like to filter the list based on the title text (because it might change).
I assume that you are using Nintex Forms and a drop down control to display your events?
When the user selects a value of the drop down, the value of the selected option can be found as a formatted string as "[ID];#[Title]". If you add a calculated control to your form and set it's formula to the value of your events "Named Control", you can see this value output. e.g.
This should be the value saved in your list column. You should be therefore able to use the Regular Expression action to trim out the ID of the value and assign it to the workflow variable.
Off the top of my head, I think I would have to:
Unfortunately I'm not using it in a form, but in a workflow step (set variable).
There the field does not contain ID;#Text as it does in raw SharePoint, it only returns the text part.
So where has the ID gone? Why is it stripped off?