Clearing a variable once it's dependent variable changes not working

Amol Pawar
Tera Guru

Hi Experts,

I have a requirement for a record producer as mentioned below:

I have created two variables in a record producer. The first variable is a Reference type and the second variable is also a reference type variable. For the second variable, I'm using a custom table and a reference qualifier to populate values from the first variable's reference table.

When the first variable value is changed, the second variable value should also be changed. But the second variable's value is not changing. I1.png

 I have created an onChange client script but it's not working.

Let me know if I'm missing anything.

I2.png

 

Thanks in advance,

Amol

1 ACCEPTED SOLUTION

Pratiksha2
Mega Sage

Hello @Amol Pawar ,
Please try below code:

 function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
if (newValue) {
g_form.setValue('infosys_entity ', ' ');
}
}

Please Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Pratiksha

View solution in original post

5 REPLIES 5

Thank you all of you for your quick reply,

I have marked helpful for the answer.

Thank you so much!