Nintex Forms - First Value of Lookup as Default Value with Condition

Hey Guys


I'm trying to set the default Value of my Nintex form Lookup Control to the first available value.
I'm using a URL Parameter to filter the lookup control, so there is always only 1 available value.

Like that: https://SITEURL/_layouts/15/NintexForms/Modern/NewForm.aspx?List=97e2b282-83ec-4a31-8eca-76993f1240b...

So my goal would be, if PartnerID from the QueryString is not empty, use the first Value as Default Value.

Is this possible? I'm really bad in Javascripts so have no idea. 🙂


This example I found is not working for me:

NWF$(document).ready(function() {
var defaultPartner = NWF$("#" + lookupPartner).val();
if (defaultPartner == '0') {
NWF$("#" + lookupPartner).val('1');
} );


I set lookupPartner as Client ID variable of the lookup Control.


Best Regards

0 Kudos