How to add list collector of location in the approver table for if approver is the Contact

Samiksha2
Mega Sage

Hi All,

I have a catalog item in which a variable is a list collector (cmn_location). 
In the location table I have added the contact for each location.
The flow is approver will go based on selected location's contact. (This is working).
The requirement is in the approver table that location should be populate for which contact is approving.

For example,
In the location table
Location 1 has User 1 contact

Location 2 has User 2 contact

Location 3 has User 1 contact

Location 4 has User 1 contact

And in the catalog item end user has selected Location 2, Location 3,Location4

In the Approver table, in the string value for User 1 Location 3 and Location 4 should populate and for User 2 Location 2 should populate.


The reason behind doing this is they want a report where stakeholder can see who approves which location.
I have created a database view for requested item and approver table.
But I am unbale to get the list collector values separately. 

If any other way to to do this, please let me know.

Thanks,
Sam
 

 

28 REPLIES 28

@Samiksha2 

did you give the list collector variable sysId in the where clause here?
mtm.request_item=r.sys_id & mtm.sc_item_option = 'listCollectorVariableSysId'

try to play around with how that contains works and then your database view will work

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

yes,
mtm.request_item=r.sys_id & mtm.sc_item_option = 'listCollectorVariableSysId'- I did correctly.
v.request_item=r.sys_id & v.sc_item_option = '210a170fc34d96109cf8b245990131b7'

Samiksha2_0-1743065769182.png

 

@Samiksha2 

try this instead of above

Table Order Prefix Where
sc_item_option_mtom 400 mtm mtm.request_item=r.sys_id
sc_item_option 500 imp instr(imp.value, a.approver)>0 & mrm_sc_item_option=imp_sys_id

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

Hi @Ankur Bawiskar ,

Samiksha2_0-1743066377761.png
This many records are showing. with multiple same values.

 

@Samiksha2 

Sorry I can't spend much time on this.

I believe I have provided enough guidance, you can enhance it further.

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