- 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-28-2024 03:00 PM
Yes, You can do a GlideRecord.
Assuming u_sample_checkbox is defined on the catalog task and since the workflow runs on sc_req_item table, you cannot use current.u_sample_checkbox. Trywith below sample code
Ex:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 09:38 PM
and to call the function should I write--> answer = ifScript(); or
activity.result=ifScript();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 10:15 PM
Hello,
I didn't checkbox was 'true' i.e. checkbox is checked why are we returning No here. Please explain your code. I wrote your code as :-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2024 10:22 PM
Your provided solution always return 'yes' i.e. return statement outside if block. Please provide any other solution