Excluding Item based on List Collector Item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-07-2023 06:59 AM - edited ‎07-07-2023 07:00 AM
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
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2023 09:18 AM
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');
}
}
}