Request for approvals from a catalog containing a List collector of servers

AbbasP
Tera Guru

Hello community members,

I was able to find some hints to this problem, but nothing specific in these forums.

I have created a catalog item which has a List collector pointing to the CMDB_CI_Servers table which allows the end users to select multiple servers.

 

The goal here is to send out the approvals for each of the server owners (owned by field) which is populated in the CI once the request is submitted.

 

I have attempted to do this via flow designer and my limited knowledge of scripting but with no success (see below).. Appreciate any assistance you can provide..

 

AbbasP_0-1741214222514.pngAbbasP_1-1741214266982.png

 

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@AbbasP 

why are you using script in conditions?

Why not use Lookup with condition as SysId = Dot Walk from For Each

Something like this, please enhance

AnkurBawiskar_0-1741235957546.gif

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Nick Parsons
Mega Sage

Can you clarify what the issue is specifically please? What's the current behavior (do you get an error, does only 1 approval get generated, do no approvals get generated, etc.?).

Have you also tried to debug your flow by looking at the flow executions and seeing where it's going wrong in there? That's a good starting point if not. 

Thanks for your response Nick.

Currently, I am unable to activate the Flow due to the following error and cannot progress any further:

 

AbbasP_0-1741229749678.png

The script entered is as follows in the Lookup record:

 

var serverSysID = fd_data._2__update_record_for_each.item;
var query = "sys_id="+serverSysID;
return query

Medi C
Giga Sage

@AbbasP 
Is the Flow Step you are referencing in your step still the second one? It happens often when you add a step then the order is changing and the scripted references needs to be manually updated.
Could you please check if the step "_2_update_record_for_each.item" is still on the second position?
If it is not, please adjust the script to the correct position and try saving the flow see if that works.
Otherwise, please attach a screenshot of your flow to take a closer look.


If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.

Ankur Bawiskar
Tera Patron
Tera Patron

@AbbasP 

why are you using script in conditions?

Why not use Lookup with condition as SysId = Dot Walk from For Each

Something like this, please enhance

AnkurBawiskar_0-1741235957546.gif

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader