cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

How do I Set the Default Value for 2nd List Lookup?

How can I default a (cascading) second list lookup dropdown (RegionalCode) to always use its own first value regardless of what is selected in the first list lookup dropdown (CostCentre)? Can anyone help with the following script?

These 2 fields are used in a repeating section and may be entered multiple times.

NWF$(document).ready(function() {


var CostCentreDDL = NWF$('#' + CostCentre);


CostCentreDDL.change(function () {


var CostCentreValue = CostCentreDDL.val();
var CostCentreParsed = NWF.RuntimeFunctions.parseLookup(NWF$('#' + CostCentreValue,true));

if (CostCentreParsed == "3000" || CostCentreParsed =="4000" || CostCentreParsed == "5000") {

NWF$("#" + RegionalCode).val('1');

}

)}

});

0 Kudos
Reply