Excluding Item based on List Collector Item

Walter Toney
Tera Expert

I have been given a requirement to exclude "Modify" from the select box item in a Variable Set. when "RFD" is selected on the Request the RFD value is coming from list collector in the "Custom Action Table" we have built. I'm trying to build a Client script to do this. I have a similar script that excludes but that is just for a Yes/No variable. but it's looking at a variable not a external table. Based on research and trying started down this path but i can't get it to work.. can someone help me to understand what i'm not seeing

 

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

var list = g_form.getValue('application_project'); //getting value of list collector
if(list.indexOf('RFD') > -1 ){  //item in list collector
g_form.removeOption('logging_account', 'Modify'); //action to proform when list selected

}
}

5 REPLIES 5

Worked with others to get it to work.. here was the code used

 

function onLoad() {
if (this) {var dir = this.my_g_form.getDisplayValue('application_project');
if (dir == 'RFD'){
g_form.removeOption('logging_account','Modify');
}
}
}