- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 05:45 AM
As we used the script below to sync the form Category field values to RITM Category Field values, But it's not taking but in the log we are getting the catalog form category value but it is not Mapping to the RITM Category Value. Both field Types are Choice fields in the Form Level and also RITM Level
We have written the below script in the workflow Run Script Activity. But it's not working
var category = current.variables.accenture_category;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 05:55 AM - edited ‎07-25-2024 05:55 AM
You can simply use below code in the run-script activity
current.u_category = current.variables.accenture_category;
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-25-2024 05:55 AM - edited ‎07-25-2024 05:55 AM
You can simply use below code in the run-script activity
current.u_category = current.variables.accenture_category;
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 01:48 AM
Thank you @Voona Rohila it worked i have another issue where we need to assign the Assignment group based on the u_category field where this u_category field is a RITM level field not a variable field
example: If the category field has 4 to 5 options 1)Tree 2)Branch 3)stem
once the user selects any one of the category as Tree it should assign to Tree Assignment group.
Please suggest me the script where i have used Run Script in the workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2024 02:25 AM
Hi
you can write a simple if else if checks to assign based on category
if(current.variables.accenture_category == 'a')
{
//do something
}
else if(current.variables.accenture_category == 'b')
{
//do something
}
else if(current.variables.accenture_category == 'c')
{
//do something
}
Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP