- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2022 11:05 PM
When i am creating a case via record producer, there is one field "Topic Details " of data type "Select Box" , I want to populate Short description on case level with the value entered in Topic Details.
How can i populate Short description(which is of type String) with the value entered in Topic Details(Which is of type "Select Box").
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2022 11:54 PM
Hi,
so you don't want the short description to populate with OOB logic.
then use before insert business rule on Case table and similar script
current.short_description = current.variables.variableName.getDisplayValue(); // give the variable name here
OR you can use after insert BR if the before insert doesn't work
current.short_description = current.variables.variableName.getDisplayValue(); // give the variable name here
current.setWorkflow(false);
current.update();
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
‎01-04-2022 11:20 PM
Hi,
Please use the below script in your Record Prodcuer:
current.short_description = producer.VariableName.getDisplayValue(); // Replace Variable Name with Topic Details backend Name of variable
Refer to screenshot below where you need to make this change to:
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2022 11:22 PM
Hi,
you can use 2 ways
1) Map to field on Record producer and map the Variable Topic Details to Short Description field
OR
2) use record producer script
current.short_description = producer.variableName.getDisplayValue(); // give the variable name here
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
‎01-04-2022 11:47 PM
Hi Ankur ,
Thanks for your reply!
The code you have given works perfect , when case created via record producer is in draft state , but we are using hr_ServiceUtil() script include , which is making case in ready state and short description is getting populated with "hr_service case for subject_person" how can i stop this thing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-04-2022 11:54 PM
Hi,
so you don't want the short description to populate with OOB logic.
then use before insert business rule on Case table and similar script
current.short_description = current.variables.variableName.getDisplayValue(); // give the variable name here
OR you can use after insert BR if the before insert doesn't work
current.short_description = current.variables.variableName.getDisplayValue(); // give the variable name here
current.setWorkflow(false);
current.update();
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader