- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2019 05:11 AM
Hello,
Im trying to build one process via flow designer.
Im stuck on how to add RITM variables into Cat Task description.
Any idea of how to do it in the flow designer?
In the workflow, I was able to do it and below code, but the question is how to achieve the same result via flow designer.
Catalog task should have all RITM variables with their label and value, example below
Requested For: Petr Pastuszek
Requested For - is variable label
Petr Pastuszek - is variable display value
/Petr
workflow.scratchpad.u_variables = '<b>Variables</b>: <br></br><br></br>';
var set = new GlideappVariablePoolQuestionSet();
set.setRequestID(current.sys_id);// RITM sys id. We can also use - current.getValue('sys_id')
set.load();
var q = set.getFlatQuestions();
var iter = q.iterator();
while (iter.hasNext()) {
var item = iter.next();
workflow.scratchpad.u_variables += item.getLabel() + ': ' + item.getDisplayValue() + "<br></br>"; // set variable value
}
Solved! Go to Solution.
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2019 12:12 AM
Solved.
As explained earlier, the goal was whenever there is new RITM inserted (for certain process), we want to auto copy/paste all RITM variables label and variable values into cat. task description.
Below is the solution. before implementing it, consider commenting row with gs.log.....
The solution was to create a new action with the below script. Input is RITM record. RITM sys id for this action
/Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2019 12:12 AM
Solved.
As explained earlier, the goal was whenever there is new RITM inserted (for certain process), we want to auto copy/paste all RITM variables label and variable values into cat. task description.
Below is the solution. before implementing it, consider commenting row with gs.log.....
The solution was to create a new action with the below script. Input is RITM record. RITM sys id for this action
/Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2020 01:26 PM
Hi, I'm playing with flow designer. I have a question.
I've created a flow triggered off a Service Catalog item. I've also been able to use the 'Get Catalog Variables' action to grab the variables from the Catalog Item in question, and use them as inputs to a custom Action I have created.
I notice in your example here you have been able to get the sc_req_item record as an input. How did you do that?
Thanks