Skip to main content
Nintex Community Menu Bar

Form: Setting Value on Lookup field that allows Multiple values

  • June 28, 2017
  • 2 replies
  • 21 views

Forum|alt.badge.img+1

Can anyone point me to Documentation or how to set a lookup field with allow multiples?

205058_pastedImage_1.png

I'm using a query string ?cases=34

34 is the ID of the lookup item i want to set into the value.

my js variable in the form is cases = NWF$("#" + cases).val(34) does not work

please help as i need to get this into testing immediately.

Thanks

2 replies

Forum|alt.badge.img+14
  • Scholar
  • July 5, 2017

you haven't specified what platform you need it for, but following should work on NF2013 on-prem

NWF$('#'+cases).closest('.nf-dataaccess').find('.allOptions option[value="34"]').prop('selected',true);
NWF$('#'+cases).closest('.nf-dataaccess').find('.addSelectedItems').click();‍‍

Forum|alt.badge.img+1
  • December 24, 2017

I tried the same code in sharepoint online but it was not working.

NWF$('#'+WISteps).closest('.nf-dataaccess').find('.allOptions option[value="117"]').prop('selected',true);
NWF$('#'+WISteps).closest('.nf-dataaccess').find('.addSelectedItems').click();