Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 01:24 AM - edited ‎02-27-2025 01:35 AM
I have a catalog item where I have a multiple-choice variable 'at what level it is required' which has 2 values 'sub' and 'resource'. If we select sub then another reference variable 'select sub' would be visible which refers to 'xyz' table and if we select resource then another reference variable 'select resource' would be visible which refers to 'abc' table.
Each and every record of both the table abc and xyz has 'key value' on the related list which has many records. These records have fields like 'key' and 'value'.
The requirement is if 'key' is environment and 'value' is 'pr' or 'np' then in the workflow I have to create a task and if it is not 'pr' or 'np' then I have to create another task.
I am not sure how to check the 'key' is environment and 'value' = 'pr' or 'npe' or anything else in workflow activity.
Could you please help me out.
Thanks&Regards,
Abhisek Chattaraj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 02:10 AM
Hello @abhisek ,
Could you please provide some screenshots of the table and related list so I can better understand the issue?
If you found my response helpful, please mark it as correct and close the thread to benefit others.
Regards,
Kaustubh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 02:13 AM
very difficult to visualize without screenshots.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-27-2025 02:49 AM
Hi @abhisek ,
Could you please try using "if" condition (Checking advanced checkbox) from the Core activities in Workflow? There you can check the variables value using:
current.variables.variable_name
For this to work properly, please ensure that the value is cleared using UI Policies or Client Script when the fields you want to check on should not be visible on your catalog item.
If the requirements is to get other fields from the table, you can simply use the regular Glide Operations to query based on what you have from current.variables.variable_name.
Should my response be helpful, kindly mark it as correct and close the thread to facilitate future reference for others.
Best regards,
Medi
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.