- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 02:02 AM
Hi ,
I have catalog item with the filed called request type, it is a choice field we have multiple choices. When user selects some of the choices from the dropdown and clicks order now . Then it will create a RITM and attached with catalog task.
Now i need set the catalog task short description field with some text based on the selected choice for catalog item filed.
Please help me how to achieve this. Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2020 07:50 PM
Hi Ankur,
I have given filter condition like below but the values which are not storing in worknotes.
Script:
var str = '';
if(current.u_actual_effort != '')
str = str + previous.u_actual_effort + ' ';
if(current.u_week_and_month != '')
str = str + previous.u_week_and_month;
current.work_notes = str;
})(current, previous);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 02:48 AM
It would be form like,
if(current.variables.variable_name=='admin')
{
}
else if (current.variables.variable_name=='abc')
{
}
else if{
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2020 02:53 AM
Hi,
you can use switch case as well
var value = current.variables.<variableName>;
switch(value) {
case "abc": task.short_description = ''; // specific description
case "def": task.short_description = ''; // specific description
case "xyz": task.short_description = ''; // specific description
}
Mark ✅ Correct if this solves your issue and also mark 👍 Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2020 05:47 AM
Hi,
Please consider marking appropriate reply as ✅Correct & 👍Helpful.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 07:20 AM
Is this answered?
if my answer helped you, kindly mark it as ✅ Correct & 👍Helpful so that others can benefit from similar question in future.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2020 08:16 PM