Script Include and Client Script

shatakshi10
Tera Contributor

There is a variable on service catalog that is targeting to location [cmn_location] table, so If requested for changes location changes too depending on requested for, so if requested for belongs from USA country and his location is "Mesa" then a select box choice should be "True" but if requested for belongs from USA country and his location is "San Diego" then a select box choice should be "false".

I tried creating script include and calling in client script but didnt worked.

5 REPLIES 5

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

Try this, onchange client script which runs on change of the user field

 

function onChange(control, oldValue, newValue, isLoading) {
    if (isLoading || newValue == '') {
        return;
    }
    var ref = g_form.getReference('<user Variable>', location);
    }
function location(ref) {
      if( ref.location == '<something>');
        //do whatver, show hide variables
    }
}

 

 

-Anurag