Adding variable values to additional comments within a workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:08 AM
I've got a catalogue item that populates the selected Configuration item within the 'configuration_item' field of the form,.
I've got a workflow activity that sends additional comments to the requestor if it's not approved within 30 days.
However, what I'm wanting to do is get the value of the 'configuration_item' and put the name and number into the Additional comments alongside the ones I've defined in the above screenshot. I was just wondering if this is possible to do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:31 AM
Hi @matthew_hughes ,
Instead of set value use Run script activity with below code:
current.comments="your text"+current.<configuration item field name>;
Thanks,
Gopi

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:37 AM
Hello @matthew_hughes
Use run script activity instead of set value activity. write below script in the activity:
current.comments = "Your_Text \n" + "Number: " + current.getValue("number") + "\nConfiguration Item: " + current.getDisplayValue("cmdb_ci");
Thank you,
Ali
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2023 12:38 AM
Hi @matthew_hughes ,
You can use ${current.configuration_item.name} in between your text to refer a field value, otherwise you can use run script activity to set the values.
Anvesh