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

How to create and get the key and value from List Lookup control?

We are using Nintex form with SharePoint. Suppose we have two lists ABC and XYZ. On list ABC we have nintex form with list lookup control which is associated with list XYZ. In list XYZ we have many columns including EmpId and EmpName. We want to do like this html select - Get selected key/value of a combo box using jQuery - Stack Overflow .We want to create list lookup control such a way that while displaying results it should display values from EmpName column and while retrieving values in javascript/jquery it should retrieve values from EmpId column. How to create list lookup control with such key value pair and retrieve results using key value pair?

0 Kudos
Reply
3 Replies
Automation Master
Automation Master

Re: How to create and get the key and value from List Lookup control?

that's how lookups work by default. you do not need implement any extra logic so that you show (text) value but query by ID.

value of lookup control is always in a form: ID;#textvalue

to get one or the other part out of it use parseLookup() function

0 Kudos
Reply
shaileshkjaiswa
Nintex Newbie

Re: How to create and get the key and value from List Lookup control?

Thanks for reply I am getting ID in JavaScript but it is out of box sharepoint column 'ID'. I want EmpId in JavaScript. How to do that?

0 Kudos
Reply
Automation Master
Automation Master

Re: How to create and get the key and value from List Lookup control?

ok, I see.

but if you have lookup field configured in list it will anyway make a link/search with internal ItemID and not with your custom EmpID.

imho, you do not need to bother with EmpID at all.

0 Kudos
Reply