A has been the user’s visible shared group.the flow code is not necessary. And the next code
is not correct.the value groupInList what is group where user is visible but user is not in.
I do not quite understand what you are trying to say. Can you please clarify?