onChange client script for multiple variables

aasheesh
Tera Contributor

I have 10 multiple choice variables and 5 are dependent on other 5.

ABCDEF 12345

1 dependent on A

2 on B and so on.

A(Type) has 2 values Change & Remove

1(License) has 5 options available including None.

 

I need to actually change the value of License to None everytime Type changes from Change to Remove which i can achieve using Onchange script.

But is there is way i can do it all together for all 5 Type variables instead of writing 5 different scripts. 

1 REPLY 1

MrRalphMan
Giga Expert

Hi,

You can add a function to the onLoad client script for the table and then call it from within the onChange Client Scripts.

This would allow you to have a common code set for the five fields, but you would still have to have the five onChange client scripts to call this common code.

From your use case, I cannot see that this would give much benefit if you are checking a different field for each of the 5 parent fields.

Please see the following Communities link for more info on this.

Many Thanks,

Paul