In catalog form, based on list collector selection values the approvals should trigger.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 02:23 AM
Hi All,
Only One Approval should trigger if managers are same for multiple servers, but if the managers are different for each server, then each approval should trigger to respective manager separately.
How can I achieve this requirement through workflow using run script activity.
Here is the requirement
The manager field (is owned by) is referring to this table cmdb_ci_linux_server.For reference I have attached screenshot for the values.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 04:22 AM
You will need to find the managers, loop through them to see if there is already an approval record and if not, create one. Or go the easy way and move away from run script activity and use the flow designer.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2024 10:04 AM
@Pidikiti Bhanut Below is my implementation steps followed based on the use case,
1. Created a list collector field to select multiple servers and linked to cmdb_ci_linux_server table.
2. Created another list collector field to list the managers of the selected servers using script include and onChange catalog client script.
Note: Make it as read only and hide it on the form if required.
Catalog client script : onChange of Server selected
Script Includes:
3. Pushed the managers to the approval activity in the workflow. As suggested by @Mark Manders go ahead with flow designer if possible.
4. Set the approval activity, approve selection as "Everyone to approve" incase of multiple managers (owned by)
Results:
Multiple Servers - Same Manager
Multiple Servers - Different Managers
Please mark this as helpful and accept it as a solution if this resolves your query.
Thanks,
Sujatha V.M.
Sujatha V.M.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 03:26 AM
Hi @Ankur Bawiskar @Sandeep Rajput @Anurag Tripathi @Community Alums , help me to reach out solutions on this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2024 05:01 AM
so what did you start with and where are you stuck?
1 server will have only 1 manager.
Are you allowing user to select multiple servers on catalog form?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader