- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 10:35 AM
Hi Everyone,
Just curious if anyone has done this before with the populated variables from an MRVS to display in the RITM Comments and/or SC Task.
Would this be done in the workflow for the catalog item or a different area? The reason we want to set this up is the global search for the MRVS is not doable in ServiceNow so wanted to paste the input from the user on the catalog item to the description in a format similar to below:
Description:
MRVS_Variable_1 : Name
MRVS_Variable_2 : Number
MRVS_Variable_3: Description
Repeats if there is more than 1 row.
Or if anyone knows how to make the MRVS data searchable via the global search that would work also.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 12:01 PM
Hello @Aaron25 ,
you can write some script in a business rule may be to update the description of your RITM .
it can be an before insert BR with the condition as "Item is your item name"-->To make sure BR runs only for your catalog item and then try this kind of script below to parse the MVRS data as it returns data in JSON format.
var parsed = JSON.parse('your_mvrs_internal_name');
for(var i=0; i<parsed.length; i++)
{
current.description = "Row "+i+" : Name :" + parsed[i].your_name_variable_backendname + "Number : "+parsed[i].your_number_backend_name+"Description :"+parsed[i].your_description_backend_name+"\n";
}
Note :this code is untested but i am sure you can write this way which will populate your description
Let me know if this works
If my answer helped you in any way please mark it as correct
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2023 12:01 PM
Hello @Aaron25 ,
you can write some script in a business rule may be to update the description of your RITM .
it can be an before insert BR with the condition as "Item is your item name"-->To make sure BR runs only for your catalog item and then try this kind of script below to parse the MVRS data as it returns data in JSON format.
var parsed = JSON.parse('your_mvrs_internal_name');
for(var i=0; i<parsed.length; i++)
{
current.description = "Row "+i+" : Name :" + parsed[i].your_name_variable_backendname + "Number : "+parsed[i].your_number_backend_name+"Description :"+parsed[i].your_description_backend_name+"\n";
}
Note :this code is untested but i am sure you can write this way which will populate your description
Let me know if this works
If my answer helped you in any way please mark it as correct
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-10-2023 03:23 AM
HI Mohith ,
Need some help i have same mrvs with name scheduled_tasks
in that we have a varaible called company
need populate ritm short description by using runscript in workflow please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 10:16 AM
Thanks Mohith,
I ended up doing this report below.
As the business stakeholders wanted to be able to report on it also. I will definitely try your solution for the next catalog item i have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-20-2023 10:17 AM
I also used that link above for reporting.
Thanks for your help Mohith