Find if the group has any active members using flow designer

Atheher Fathima
Mega Guru

Hi All,

 

I have a requirement to find out any inactive members(users with profile active = false) and check if this group has any active member before we delete this member. I have a flow created to fetch the details on the inactive members in sys_user_grmember table,however i am unable to fetch if this group has any active members. In case there are no other active members,i would like to create a task. Please assist on how i can find if the group has an active member in flow designer

AtheherFathima_0-1665061476518.png

 

any guidance on this is greatly appreciated

 

1 ACCEPTED SOLUTION

Atheher Fathima
Mega Guru

I was able to use the Script condition to fetch the details  on sys_user_group table

"

return "active=true^typeLIKEe151c58e87b7e81092d696883cbb35a5^RLQUERYsys_user_grmember.group,=0,m2m^ENDRLQUERY";
Active - true , type = assignment group and a relative query with grmember table

View solution in original post

6 REPLIES 6

You will find a check box in your action Lookup Record which states something like "don't fail on error", check it (true).

Also, you can see that you have found 90 records from Lookup Records Action, which is visible in your For Each Item in flow logic.

Atheher Fathima
Mega Guru

I was able to use the Script condition to fetch the details  on sys_user_group table

"

return "active=true^typeLIKEe151c58e87b7e81092d696883cbb35a5^RLQUERYsys_user_grmember.group,=0,m2m^ENDRLQUERY";
Active - true , type = assignment group and a relative query with grmember table