Skip to main content

In Nintex Forms for SharePoint 2013, I have a List Lookup Control that displays data from a List of reference items elsewhere in my SharePoint site. How can I set the selected value of this list using jQuery (such as that shown below) and make it seem to SharePoint as if the user has made the selection in the UI?

If I set the value of the List Lookup Control manually in the UI, the correct value is saved in my form item. However, if I set it with script, nothing is saved back to my form item. I know that there is some kind of magic going on in Nintex Forms when the user makes the selection manually, but I can't reproduce it with jQuery.

NWF$('.expenseType option').each(function() {

  if(NWF$(this).text().toLowerCase() == myExpenseType.toLowerCase()) {

     NWF$(this).attr('selected', 'selected');

     NWF$(.expenseType select').trigger('change');  

 }

});

Thanks for any suggestions or solutions!

Reply