- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 12:29 AM
Hi Team,
I have a requirement we need to add a custom field, the type of the field is True/false in the catalog task once the task is completed and value is set to that field,I need to get the value of the custom field in the workflow.If the value is true i need to trigger one activity or if the value is false i needs to trigger another activity.
How can we achieve this?
Please help me.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 02:42 PM
Instead of "request_item" you can use "parent" in line no. 8 and also verify that in the task record in which field RITM no. gets populated. And if it is different than request_item and parent then use that instead of both.
Thank you!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 06:31 AM
Since the workflow runs on the RITM (sc_req_item) table, you will need an If activity with a script that executes a GlideRecord on the sc_task table for the current.sys_id as the GlideRecord request_item or parent. Once the correct record is retrieved, you can set the return/answer based on the custom field on the sc_task table record. Give the script a shot, and post your progress using the insert code icon </> if you get stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 06:33 AM
Hello @bhargavi143 ,
Please refer below logic and if it is not working then please elaborate your requirement so i will update my response accordingly:
After catalog task activity of your workflow, you can use "if" condition activity and set advance = true and in script you can add below code:
After "If" activity, you can join your next activity to "yes" which required to execute for true condition and join your another activity to "No" which required to execute for false condition.
If my answer helped you in any way, please then mark it as helpful or correct.
Thank You in advance!!
Thank you!!
Dnyaneshwaree Satpute
Tera Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 08:50 AM
Hi ,
Thanks for the reply!
I have tried in my instance but no luck its every time triggering "no" condition if i have selected the custom field as true in the catalog task.
Please check the below screenshot and give me the suggestion where i need to change.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2024 10:11 AM
Since your custom field is the true/false type, use true without quotes in the if condition. Also, be aware if you have more than one Catalog Task at this point for this Catalog Item you will need an additional addQuery line on short_description, or another field that differentiates them, to ensure you return the intended one.