How to update multiple records in flow designer?

Joyce4
Kilo Expert

I am trying to look up for inactive users that are still marked active in SNOW and mark them as inactive, and locked out. 

I tried doing this workflow but it doesn't look right. In action (3) under Conditions User Id is 1 -> u_inactive records doesnt' allow me to actually specify that it is the user ID in the results from action (1).

Can someone please assist? 

1 ACCEPTED SOLUTION

I believe "u_inactive_record" is a staging table and you want to populate the value in sys_user. For that you have to add "look up record" action below the for loop and do a update record action. Like below 

Below For

1. use Look up record, select table as sys_user and in condition, "user ID" is "u_inactive_record.user_id"

2. Update user record, active - false and lock out true

 

 

find_real_file.png

View solution in original post

11 REPLIES 11

Ankur Bawiskar
Tera Patron
Tera Patron

@Joyce S 

I think that is not how Update Multiple Records Action work

Can you try this once i.e. use sysId column and dot walk to sysId

Sys Id [IS] 1->u_inactive_records->sysId

Regards
Ankur

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

@Joyce S 

You need to use Lookup Records with For Each and iterate over those records and then use Update Record Action.

Using "Update Multiple Records" action I believe you cannot give the entire query as encoded query

you can try to use the f(x) with script and check once

Regards
Ankur

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

@Joyce S 

Hope you are doing good.

Did my reply answer your question?

Would you mind marking the best matching answer as correct and helpful, to close this thread?

Thanks!
Ankur

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

Carlos Candano
Mega Guru

Hi

Your Look up inactive records will be an array object. You will need to use the for each to go through each of the records you have. I don't think it will work if you directly plug in the array as a filter.