- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 09:57 AM
I have a custom workflow on a custom table that creates a series of tasks. The first task's user input is required in the second/next task.
I wish to store the data in 'user Input' field data somewhere in the workflow so that I can use that as a description for the next task in the workflow.
Is it possible, please suggest !!!
I think the workflow.scratchpad can be used to store the value. I'm not sure how to pass the value from the workflow task to scratchpad.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-06-2020 12:37 AM
Hi,
You can still do that.
Put on run script activity in between this two tasks. Then get the journal entries.
var gr = new GlideRecord('customtablename');
gr.addQuery('parent',current.number);
gr.query();
if(gr.next()){
workflow.scratchpad.notes = gr.work_notes.getJournalEntry(-1);
}
Then this scratchpad can be used in next task.
Thanks,
Ashutosh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 02:25 PM
Hi,
You can use workflow.scratchpad for sure.
I used it in task activity as below where i want to pass the number from one task to other
workflow.scratchpad.num = current.number;
In next task you can directly use workflow.scratchpad.num whereever you want
Thanks,
Ashutosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 11:19 PM
Hi Ashutosh,
The example you have given is using the current.number. Current points to the table of Workflow.
This is not working for me.
I want to store the user input/work notes that are put on the first task by the user. When this task will be completed, a new task will be created as per the workflow. In new task, I want that same info( user input/work notes) posted in the description of a new task.
I am not able to get the user input/work notes on workflow.scratchpad variable.
Please suggest what else can be done.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 11:23 PM
Hi,
Current points to the table of Workflow ?
- Yes it point to the workflow table, If your table related to service catalog then it will not work.
like workflow.scratchpad.variable = current.number;
instead of that use below
workflow.scratchpad.variable = current.variables.variable_name;
For getting task details try to dot walk like task.fieldname and assign those to workflow.sratchpad.variable
try like below
workflow.sratchpad.variable = task.fieldname;
Thanks,
Kunal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-05-2020 11:33 PM
Hi Kunal,
It is not a service catalog table nor RITM table.
It a custom table.
I wish to store the user input/work notes that are put on the first task by the user. When this task will be completed, a new task will be created as per the workflow.
In new task, I want that same info( user input/work notes) posted in the description of a new task.
I am not able to get the user input/work notes on workflow.scratchpad variable.