I am creating a screen flow and want to set Condition visibility a picklist field based on the user belonging to a particular public group but I can't see option for group.
1 Answer
This is not directly doable in Flow. A public group can have as members
- direct users
- public groups that have direct users
- Roles that have direct users
- Roles and Subordinates which recursively have direct users
See schema
You will need an element prior to the display of the screen:
- Call an invocable Apex that takes as arguments the userId and groupApiName and returns a boolean (true - in group, false, not in group). This result variable can be used in the filter on the screen flow
- The invocable Apex will need to use the logic shown in this Help article.
Role
orRole w/ Subordinates
? see schema