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:
https://docs.suitecrm.com/user/advanced-modules/workflow/

More info on LogicHooks here:
https://docs.suitecrm.com/developer/logic-hooks/