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

Set Lookup List Value with TextBox Value

Jump to solution

I have list form that needs a few fields to be populated via SharePoint's Quick Edit feature. One of these fields is a country list lookup dropdown.

When the user inputs a country value in Quick Edit, they're populating a single line of text field. How can I set the value of the country list lookup with this textbox value when the form is brought up in Edit mode?

Any JavaScript would be appreciated. This is somewhat tricky because as we know, the list lookup values are not actual values...

Labels: (2)
0 Kudos
Reply
2 Replies
Automation Master
Automation Master

Re: Set Lookup List Value with TextBox Value

Jump to solution

why not to direct users to select a value in lookup field? 

if you let them type in text value on their own they will definitely make mis-takes/types and you will get into troubles to identify proper value in lookup list.

if you insist on a javascript, it will highly depend on exact forms version you use, since lookup internal functionality and model is quite often changed. for the most recent version something like following should work

https://community.nintex.com/message/64742-re-set-default-value-to-lookup-field-stopped-working-afte... 

0 Kudos
Reply
furstlars
Nintex Newbie

Re: Set Lookup List Value with TextBox Value

Jump to solution

This is what I've done. For quick editing, data pasted goes directly into the lookup column field.

If using the actual form, the lookup field is connected to  a single line of text field, which via the following script, populates the lookup field each time the form is brought up:

var OfficeVal = NWF$('#' + OfficeSingleLineTextField).val();
NWF$('#' + OfficeLookupField + "option[value$= "+ OfficeVal +"]").prop("selected", true); 

0 Kudos
Reply