- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2019 11:37 AM
Is there a reason why I have a blank option for one of my variable on this catalog item?
Is there something in my script that can cause this?
\
I also have Read Only as a choice under this variable.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 08:28 AM
Try this:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
var test = g_form.getValue('access_needed'); //Change accordingly
g_form.clearOptions('type_of_access');
if(test == 'flowcal mlp'){ //Change accordingly
g_form.removeOption('type_of_access', 'read only');
g_form.addOption('type_of_access', 'edit','Edit');
}
else
{
g_form.addOption('type_of_access', 'edit','Edit');
g_form.addOption('type_of_access', 'read only', 'Read Only' );
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2019 02:59 PM
My bad Updated script here
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
var test = g_form.getValue('access_needed'); //Change accordingly
g_form.clearOptions('type_of_access');
if(test == 'flowcal mlp'){ //Change accordingly
g_form.addOption('type_of_access', 'edit');
g_form.removeOption('type_of_access', 'read Only');
}
else
{
g_form.addOption('type_of_access', 'edit');
g_form.addOption('type_of_access', 'read only');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 05:28 AM
Prateek,
This script hides choices for Type of Access for either flowcal legacy or mlp.
Thanks,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-22-2019 08:07 AM
Can you please post a screenshot of choice values of access_needed variable and type_of_access variable?
As per your reply it says blp (flowcal legacy or mlp) but as per the script it says flowcal mlp.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 03:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-25-2019 03:26 AM
Also if MLP is selected only Edit needs to be available.