- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 04:45 AM
Hi All,
I got a requirement that There is a variable "add mobile number", It should not visible on the form and It should visible only on the fulfilment catalogue task. As soon as the request submit , three task will be generation , one is investigation and another two is fulfilment task. But I do not want that variable on the investigation task , from fulfilment task onwards that particular variable should visible and should be madantory .can anyone help me with this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 09:50 PM
then you can use onLoad client script and check the type and then make variable mandatory
something like this
function onLoad(){
if(g_form.getValue('type') == 'fulfillment'){ // give correct choice value here
g_form.setMandatory('variables.variableName', true); // give correct variable name here
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 06:12 AM
how are you determining the task type i.e. investigation etc
Are you using some short description etc?
If yes then you can use normal onLoad client script on sc_task table and check the short description and based on that show and make the variable mandatory
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 06:19 AM
Based on the type classification , we can define which type of task it is
can you provide me the script for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 06:22 AM
Based on the task classification type we can define which type of task it is.Please find the screen shot.
can you provide me the script for this.
Thanks
Vamsi B
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2023 09:50 PM
then you can use onLoad client script and check the type and then make variable mandatory
something like this
function onLoad(){
if(g_form.getValue('type') == 'fulfillment'){ // give correct choice value here
g_form.setMandatory('variables.variableName', true); // give correct variable name here
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader