Validation rule for 2 users acting on the same field

Hello,

I am looking for a way to allow 2 (maybe more) users and or groups to be valid in a validation rule at the same time. This particular use case can be described as a user and a group of managers should be able to edit an “Request status” field on a project record. Is that possible?

I ask this question as I am not able to find a way to set up 2 rules which covers the same field without them conflicting each other. For example, I am able to set up 2 independent rules for the user/group to edit the field in question perfectly fine.

Rule 1, the user can update fields they need (Timeline, Request status, etc….)
Rule 2 , the manager can update their fields (Request status, Client name, etc…)

But if I make these rules, enable both and then act as the manager to make changes I get the user rule error message, and vice versa when acting as the user and make changes to the field I get the manager rule error message. Each works fine with other fields when enabled.

Due to have conflicting validation my “solution” is to set a rule that cover both the user and the groups access in 1 rule.
Is there a syntax I should use rather then just "or” between the 2 rules which the formulas box says is valid? [User who triggered Rule] != [Step 1 Projects].[Project lead] or [User who triggered Rule].Groups.Filter(Name = “Project Managers”).Count() = 0

I am lost as to where I may have mis-stepped or overlooked something. Though I do realize validation rules are rather new and this maybe more bug/issue then help question.

Thank you for any help you can provide!

I think you should use ‘and’ instead of ‘or’, since you actually want to block the change if the user is not the project lead AND is not in the project managers group.

Thank you Chr1sG!

That did work, I am still getting use the inverse blocking nature of the validation rules, as compared to granting permission setups. :sweat_smile:

Though is there a solution for separate rules covering the same field? I ask since I don’t want to waste validation rules making one for each field as different groups need access within a database. If I have 3 groups and 7 “access pairings” I would rather use 3 rules rather than 7.

Thank you again!

Can you clarify what you need to allow/block

Sure.

In real life my parts database has 5 groups, and roughly counted 10-12 different sets of fields. I would like to only make 5 groups per database rather than 10 and save more rules for other databases. The fields are most of the different types of fields except for emails, phone numbers or avatars.

For a “simplified perfect” example, 4 groups(“Juniors, Production, Managers, Supervisors”) and 8 sets of fields (1 or more fields per set) with this access schema.

  1. Jr’s, Pro, Man (all 3 have edit access, etc..)
  2. Pro, Man
  3. Jr’s, Man
  4. Jr’s, Pro,
  5. Jr’s,
  6. Pro,
  7. Man
  8. Supervisors

Currently I could make 8 validation rules for each set of fields to have their own access. Thank you for the “AND” solution. But I would like a way to set 4 rules such that each group has there own access.

Juniors have access to fields 1,3,4,5
Production have access to fields 1,2,4,6
Managers have access to fields 1,2,3,7
Supervisors have access to field 8

As I have tried it now these 4 rules don’t work. If you are a manager and edit a field in set 2 which you should have access, it gives the production error message since you aren’t a part of the production team.

only sets 5,6,7,8 “work” as intended as there is no overlap.

I would also want the 4 rules so that as workflows evolve or change I can add/remove fields from a groups access quickly rather than have to figure out exactly which of the 8 sets a field needs to move from and then to. Though my actual database is not going to be so simplified and perfect.

I assume there is a way to set up these rules, and that I just haven’t figured it out. Please let me know if this makes any sense. or if what I am asking for is too much of a dream.