catalog

nameisnani
Mega Sage

Hi Team 

 

Can any one please help me here , 

 

We have variable ' company code ' it is mutilple choice

nameisnani_0-1712126108515.png

 

And having 4 values in Company code . 

Example :

00001

00002

00003

00004

 

And we have type of request variable

FGS - KingTone

FGS- mameber 

 

If any user selected type of req is '  FGS - KingTone ' then in the company code '00001' and 00002 has to be populate .

If any user selected type of req is '  FGS- mameber ' then in the company code '00003' and 00004 has to be populate .

 

can any one please provide steps of Cilent script . 

 

Please provide me script .

Thanks in advance 

5 REPLIES 5

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @nameisnani ,

 

Here your your on change catalog client script:

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

    var typeOfRequest = g_form.getValue('type_of_request');


alert(typeOfRequest );
    if (typeOfRequest === 'FGS - KingTone') {
        g_form.removeOption('company_code',  '00003');
        g_form.removeOption('company_code',  '00004);
    }  else if (typeOfRequest === 'FGS - KingTone'){
        g_form.removeOption('company_code',  '00001');
        g_form.removeOption('company_code',  '00002');
}
}

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect