Delete security groups when saving according to selection

I use some conditions on file (edit.view), I would like to exclude security groups or a security group from that registry if a given field is selected.

is it possible to do that?
Someone could guide me

You might need to create a Workflow or create a LogicHook to take care of that at the time of saving.

More info on Workflows here:

More info on LogicHooks here: