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

Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

Thank you in advance for any help you can offer.  Here is a description of the problem.

A List Lookup control has the following properties

And it has these filter-by values

- Control: 'sltCompany'
- Column: 'lpCompanySpecific'

Positive test works as expected...

- filter value = results

Negative test works as expected…

- no filter value = no results

…until I start setting the control value programatically using Javascript

After function set the control value,

no results are returned.

Even manually retyping the filter value,

the filter no longer works

Reload the form,

manually type the filter value,

and the filter works again.

Then execute the Javascript to override the typed control value...

...and again the filter no longer works,

even manually retyping the value,

no results

Normal Javascript, nothing extravagant

0 Kudos
Reply
6 Replies
Highlighted
Automation Master
Automation Master

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

Hi Neville Scheevel‌ !

I think this might solve your issue:    

Let me know if it works out!

Cheers,

Rhia

Reply
scheevel
Nintex Newbie

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

I updated by code to this...

function SetCtrlValue () {
NWF$ ( '#' + ctrlCompany ).val( 'ABC Company' )
var ctrl = NWF$ ( '#' + ctrlCompany )
NWF.FormFiller.Functions.ProcessOnChange( ctrlCompany );
}

...and it produces the following Javascript error

0 Kudos
Reply
Automation Master
Automation Master

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

Hmm interesting! And this is On-Prem not O365, right?

0 Kudos
Reply
scheevel
Nintex Newbie

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

Correct, 2013 on-prem.

0 Kudos
Reply
Automation Master
Automation Master

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

I think I got it!

function SetCtrlValue () {
NWF$ ( '#' + ctrlCompany ).val( 'ABC Company').trigger('change');
 }

Try this out This worked for me in my trials.

Cheers,

Rhia

View solution in original post

Reply
scheevel
Nintex Newbie

Re: Cascading Lookup Fails When Criteria Is Set Using Javascript

Jump to solution

Brilliant! That fixed it! Thanks so much!

Reply