Why I am not able to process the list type input inside the action script?

Manikantahere
Tera Contributor

I have a input i.e. list user type where people can select multiple users. 

While I am trying to fetch the mails of the users I am not getting the result? What I am missing here?

a.pngb.png

1 ACCEPTED SOLUTION

@Manikantahere 

another way is this

1) that flow action will accept input of type Records

AnkurBawiskar_0-1745236011629.png

 

2) then in script step simply iterate those records

AnkurBawiskar_1-1745236040494.png

 

3) then pass array of records as input to that action from script (I haven't tested it yet)

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

14 REPLIES 14

@Manikantahere 

another way is this

1) that flow action will accept input of type Records

AnkurBawiskar_0-1745236011629.png

 

2) then in script step simply iterate those records

AnkurBawiskar_1-1745236040494.png

 

3) then pass array of records as input to that action from script (I haven't tested it yet)

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

so will this works normal way of passing inputs and when I do with script?? I mean both the ways?

@Manikantahere 

I haven't tested it.

Why not pass array of sysIds and the table name as input and then query that table with those sysIds?

In this way it will easily without much worry

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

@Manikantahere 

you should use Lookup Records on sys_user with this query I highlighted and then pass that to flow action which accepts Records.User

AnkurBawiskar_0-1745295836646.png

 

this worked for me.

you should use Lookup Records and then output of Lookup Records pass to that flow action

flow action copy list.gif

I believe I have answered 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

@Manikantahere 

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