Skip to main content
Nintex Community Menu Bar

Form: Setting Value on Lookup field that allows Multiple values

  • Jun 28, 2017 2:13 PM UTC
  • 2 replies
  • 27 views
  • Translate All

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
  • Jul 5, 2017 9:20 PM UTC

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();‍‍
‍‍
Translate

Forum|alt.badge.img+1

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();

Translate