- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 09:01 AM
Is there a script that can be place to remove options under a variable. UI Policy will just hide the variable and that's not what I want.
For example:
If Remove User Access is selected for Type:
I want only N/A to show and not the other 2 options for Ready Only or Write.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:39 AM
Here you go
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue== 'Remove User Access') {
g_form.removeOption('edit_or_read_only', 'Read Only');
g_form.removeOption('edit_or_read_only', 'Write');
}
else{
if(g_form.getOption('edit_or_read_only','Read Only')==null){
g_form.addOption('edit_or_read_only','Read Only','Read Only');
}
if(g_form.getOption('edit_or_read_only','Write')==null){
g_form.addOption('edit_or_read_only','Write','Write');
}
}
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:21 AM
Also I need the Choices tab present at the bottom of the form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:30 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:39 AM
Here you go
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
if (newValue== 'Remove User Access') {
g_form.removeOption('edit_or_read_only', 'Read Only');
g_form.removeOption('edit_or_read_only', 'Write');
}
else{
if(g_form.getOption('edit_or_read_only','Read Only')==null){
g_form.addOption('edit_or_read_only','Read Only','Read Only');
}
if(g_form.getOption('edit_or_read_only','Write')==null){
g_form.addOption('edit_or_read_only','Write','Write');
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:49 AM
Thanks again Ahhinay for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2016 10:50 AM
You bet!