- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 09:46 PM - edited 01-03-2023 02:21 AM
Hi All,
I have a catalog item called "XXX Application Access". And we have a variable on the form of type "List collector" where users will be able to select one/more applications from cmdb_ci application table.
Once the request is submitted, the approval should be triggered from the service offering table.
So, for every CI we have a relationship in the CI relationships table. And here Parent is the CI/Application and the Child is mapped to Service Offerings table. Please find the below screen shot for reference.
So, based on this mapping we need to trigger the approval to the Approval Group from the Offerings table for the selected applications on the catalog form.
For example, a user has selected 6 applications in the catalog form.
4 application are having same approval group and the remaining 2 are having some other approval group in the service Offering table.
In this case, we should trigger only 2 approvals in the request for all 6 applications.
one approval is for the first 4 applications since it is having the same group in the service offering table.
and the second approval is for the remaining 2 applications.
And it should complete all the approvals before creating catalog tasks.
Kindly please help me with this flow.
Appreciate your help.
Thanks & Regards,
Priya.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2023 09:03 PM
@Joshuu Please try below code. It should work.
ServiceNow Community Rising Star, Class of 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2023 08:35 PM
@Joshuu Remove "Catalog task" activity and add "Run script" activity and add below updated code to "Run script" activity.
ServiceNow Community Rising Star, Class of 2023

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 10:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 11:38 PM
Hi @Community Alums ,
Could you please help me with the script as per my requirement.
Thanks for the response.
Regards,
Priya.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 11:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-02-2023 11:59 PM - edited 01-03-2023 04:35 AM
Hi @Sandeep Dutta ,
I have created a catalog item and added application variable in it, and I want to create a workflow now. Not started anything in it.