- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 12:49 PM
I need to define the 'if ' condition on workflow after the 3rd catalog task, to check if a sample checkbox is checked on the 3rd catalog task or not. Please help me. As every time, the if condition is executing for 'No'.
My script in if condition'-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2024 05:23 AM
In your third catalog task use the below in advanced
workflow.scratchpad.taskSysID = task.setNewGuid();
then an if condition with below script
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 08:31 PM
Hello Shivani,
What are you trying to achieve here.
If the checkbox is true, what action do you need to take and if it is false, what are you trying to do. Please explain. Check the following
In your third create task script, retrieve the task sys_id in the advanced script section of the task activity in the workflow like : workflow.scratchpad.taskSysID = task.setNewGuid();
Then, in run script, you can use it like :
var gr2 = new GlideRecord('sc_task');
gr2.get(workflow.scratchpad.taskSysID);
gr2.addQuery('u_sample_checkbox', true);
gr2.query();
if (gr2.hasNext()){
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2024 10:37 PM
Hello @Aditya Banka2 ,
I am describing you my requirement which is to be achieved by using Workflows. Here it is :-
Create 4 Catalog tasks whenver a new record is inserted/created on sc_req_item table [that is why, Workflow is running on sc_req_item table] but on the 3rd Task (sc_task) Create a Field as CheckBox, if checkbox is checked, create a 4th task, with short Description -> This checkbox was ticked
and if checkbox if unchecked, short Description -> Thischeckbox was unticked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2024 05:23 AM
In your third catalog task use the below in advanced
workflow.scratchpad.taskSysID = task.setNewGuid();
then an if condition with below script
Please mark reply as Helpful/Correct. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2024 07:40 PM
Accept Solution, if applicable. Thanks!