Making the variables in variable editor editable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2020 03:07 AM
Hi ,
I have a catalog item , where there are several fields which is to be filled by the user . There are several catalog task created for this item . My requirement is to have the variables editable only in first catalog task ,and not in any other catalog tasks
Is it possible and please suggest .
Regards,
Naresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2020 03:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2024 12:09 PM
Thanks, this helped
the requirement for me was to make one variable read only in sp variable editor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2020 06:22 AM
An easy way to make all variables read-only is with the following onLoad catalog client script that Applies on Catalog Tasks
function onLoad() {
if(g_form.getValue('short_description') != 'Fulfillment'){ //short description of the task where variables SHOULD be editable
g_form.setVariablesReadOnly(true);
}
}
If this is something you want on various catalog items, you can move it to a client script (not catalog client script) on the sc_task table. You'll need to add a line to specify the catalog item
function onLoad() {
if(g_form.getValue('request_item.cat_item') == 'b1b3a1abdbf807004a29df6b5e961964'){ //sys_id of the Catalog Item that you want this to apply to
if(g_form.getValue('short_description') != 'Fulfillment'){
g_form.setVariablesReadOnly(true);
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2024 05:00 PM
Hi @Brad Bowman , I think dotWalking on client side is not possible, so I think this section of code you are proposing is not working:
if(g_form.getValue('request_item.cat_item')