Skip to main content
Nintex Community Menu Bar
Solved

JS Code Error - For rendering a value after a drop down option is selected.

  • July 14, 2021
  • 1 reply
  • 161 views
  • Translate

Forum|alt.badge.img+3

I need some assistance in seeing what I am doing wrong  with the following JS.  I got the script form another post but can not seem to get it to work.

I have two cascading drop downs (lookups).  I need to populate the second dropdown based off the first drop down selection.

Fields:

  • Drop Down 1:  Areas (there are 11 selections)
    • set a form variable for this field:  jsDDA_Area
  • Drop Down 2:  Unit (is filtered to only display the corresponding choices based of drop down 1)
    • set a form variable for this field: jsDDB_Unit

 

From drop down 1 there are two selections that will filter drop down 2 with the choice N/A.  I would like that when either of those two selections are selected form "Drop Down 1" that Drop Down 2  will auto populate with the choice N/A.

I have tried the following JS script.

 

NWF.FormFiller.Events.RegisterAfterReady(function()

{NWF$('#'+jsDDA_Area).change(function(evt)

{switch(evt.target.value){case 'Operations Labs (Polymers Technology) AL-RBB': NWF$('#'=jsDDB_Unit).val('N/A'); 

break; case 'Operations Labs (PTL Bldg.)': NWF$('#'+jsDDB_Unit).val('N/A');

break; default:    //no Area  NWF$('#'+jsDDB_Unit).val('');

break; }    })})

 

I am not sure if I am not setting up the variables correctly or if I am not able to use this type of script with Lookup fields.

 

Your guidance is greatly apprecited.

 

 

Best answer by kchaluvadi

Hi,

You can acheive this without script also, here is the link for reference, it also has a video on how to configure for cascading drop downs, not sure if you have a different requirement.

View original
Did this topic help you find an answer to your question?

1 reply

Forum|alt.badge.img+12
  • Apprentice
  • 292 replies
  • Answer
  • July 14, 2021

Hi,

You can acheive this without script also, here is the link for reference, it also has a video on how to configure for cascading drop downs, not sure if you have a different requirement.

Translate

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings