Dynamic hide/show of catalog item variables

 Based on onchange client script on field of type 'numeric scale'

function onChange(control, oldValue, newValue, isLoading) { /*if (isLoading || newValue == '') { return; }*/ for (var ic=2; ic<6; ic++){ var bDispl=(newValue>=ic); if (!bDispl){ g_form.setValue('field_'+ic, ''); g_form.setValue('field2_' + ic, ''); g_form.setValue('field3_' + ic, ''); } g_form.setMandatory('field_'+ic, bDispl); g_form.setMandatory('field2_'+ ic, bDispl); g_form.setMandatory('field3_' + ic, bDispl); g_form.setDisplay('field_'+ic, bDispl); g_form.setDisplay('field2_'+ ic, bDispl); g_form.setDisplay('field3_' + ic, bDispl);


Popular posts from this blog

GlideRecord setValue

URL link in addInfoMessage