How do I collect the value of a field from a list collector and apply it to a notification

matthew_hughes
Kilo Sage

I've got the following catalogue item that lists the different applications that I'm wanting to make the same update to:

matthew_hughes_0-1736780949999.png

Each business application has a business owner, and I'm wanting to extract the value of the business owner so that I can send the following notification to each one:

matthew_hughes_1-1736781082749.png

 

Does anyone know how I can retrieve the list of Business owners from my list collector and use it so that I can send the notifications to each business owner separately for their affected business applications. 

 

 

1 ACCEPTED SOLUTION

matthew_hughes
Kilo Sage

I solved the issues by creating a for loop in a custom action for my flow

View solution in original post

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@matthew_hughes 

you can use after insert BR on RITM table and use this

Create notification, event on RITM table and link it. I hope you are aware on how to do that

Event parm1 contains recipient in Email notification

BR Condition

current.cat_item.name == 'Your Catalog Item Name'

Script:

(function executeRule(current, previous /*null when async*/ ) {

    // Add your code here
    var val = current.variables.business_applications_to_update;
    var gr = new GlideRecord("cmdb_ci_business_app");
    gr.addQuery("sys_id", "IN", val.toString());
    gr.query();
    while (gr.next()) {
        gs.eventQueue('eventName', current, gr.owner.email.toString());
    }

})(current, previous);

In email script you can get event.parm1 and print the affected business app for that person

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

@matthew_hughes 

Hope you are doing good.

Did my reply answer your question?

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. Your answer helped me towards finding the correct solution. I appreciate it.

Ankur Bawiskar
Tera Patron
Tera Patron

@matthew_hughes 

Please mark your earlier questions as answered if those are resolved.

Members have spent time and efforts in responding to those.

By marking answer as correct other community members can benefit from it.

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