Skip to main content
Nintex Community Menu Bar

Hello hivemind. We just switched over to Nintex Forms and i’ve learned a lot digging through this forum. I apologize if this has been asked already and would be grateful for some clarity. 

We recently upgraded from SharePoint 2010(i know) to 2019 and due to the changed Microsoft has made to lookup columns i am unable to use one. Thanks to Nintex i can use a Lookup control to point to the list i want.

My question is: Is it possible to display the selections from one column, and save the associated data from another? using employee information as an example, have the drop down show the employee name but have the single line of text column capture the employee ID thats in the same list?

I am unable to use a workflow(as far as i can tell) because the list i’m looking up is on another SP site and now lookups only look on the local subsite. 

I have tried a calculated value formula but so far have not been able to get this to work. I might have to try some javascript. 

I appreciate it. 

Yes this is possible. Easiest is probably to use a form variable.

To explain how this works, I'll first explain how the lookup control works on Nintex forms. It retrieves the column data directly, and also the ID of the item that is looked up. The lookup control returns a combination of the two, and you can connect either part directly in its settings.

So how do you get another column? Well, we can look up that value through the ID, because the ID is always unique in a sharepoint list. Here's where the form variable comes in. Form variables are essentially just calculated values that aren't displayed directly on the form, but you can still connect them to a list column.

Define a new form variable on your form, let's call it EmployeeID, you can do this through the button in the top bar. In the form variable setting you also have to define a formula that tells Nintex how it should calculate EmployeeID. Enter this formula:

lookup("List title”,”ID”,parselookup(<lookupControlHere>,false),”name of employee ID column")

Replace the List title with the actual displayed list title of the list your lookup control uses as a source. Name of employee ID column is the display name of the column that contains the employee IDs. “ID” is just the ID column, leave that exactly here. The parselookup function specifically uses lookup controls and parses out either the ID (second argument is false) or the text portion (second argument is true). We want to be matching the ID with the ID column so the lookup function knows which item to parse the employee ID from, so we set the second argument false.

Finally, once you have defined your formula, connect the form variable EmployeeID to a list column that you want to parse the value to. Make sure that you don't also connect the lookup control to this same list column, you can just leave both values (the employee name and the ID) in the lookup control unconnected if you want.


Reply