- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 12:20 PM
I'm kinda new to workflows, but I've run into a brick wall and can't figure out how to do this.
All I want to do is make it so when an RITM is generated, a variable ("additional_notes") that is part of a variable set ("additional_comments") is saved to the "description" field.
So for example, a user would fill out a request intake form from the service catalog. A RITM would be generated under the REQ.
Any text entered into the "additional_notes" variable field on the intake form, I want that saved into the RITM's "description" field when it is generated.
I know this is probably something really simple that I'm missing, but hopefully you lovely folks will take pity on me and help me out. ^_^
Thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 12:46 PM
Hi, try using a script activity and set the value accordingly on the following way:
current.description = current.variables.additional_notes;
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 12:31 PM
I can't seem to edit my post, so I'll put this in a reply: I'm wondering it I can just go into the workflow for the RITM and use 'set values' to set "description" to "${current.variables.additional_comments.additional_notes}", but that doesn't seem to be working. 😕
The description field remains blank.
Going into 'properties', and then to the 'inputs' tab, I don't see anything listed there.
Maybe I'm missing something rather fundamental about getting the variables into this particular workflow? :-S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 12:46 PM
Hi, try using a script activity and set the value accordingly on the following way:
current.description = current.variables.additional_notes;
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 12:47 PM
I believe you may also have to add a current.update(); after the assignment takes place.
Thanks,
Berny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2015 01:04 PM
Thanks Berny! This script in a business rule did it for me:
function onAfter(current, previous) {
//This function will be automatically called when this rule is processed.
current.description = current.variables.additional_notes;
current.update();
}
I triggered it to run only on after INSERT, so it won't overwrite anything.
Your answer is greatly appreciated. Do you know whether this is possible to do from within the workflow, or must it be done via a business rule or something?