I have created an app with a form. The form has a many to one field called Access Groups. The user will input a certain existing group e.g. Group A. I want only people from group A to have access to that record.
If the user selects group B, only users from group B must have access to that record.
What code should I use in my record rule?