But if the picklist value is populated and if some other users who is not allowed to select that picklist value, edits anything on that page, he should be allowed to do so. But I am stuck here, since the user is not allowed to select that picklist value, even if the allowed user has assigned the value, the user faces the error when he updates anything on that record page.
For eg:
AND(OR(ISBLANK ( TEXT( Industry ) ),ISPICKVAL(Industry ,"test")),
NOT(OR($User.LastName = "ABC",$User.LastName = "DEF")))
What I am trying to do is all users except user "ABC" and "DEF" can select the value test, which i am able to do right now. But if user ABC or DEF has populated a value "test" then if other user edits that record page, they cant as they face the error, you are not allowed to have the picklist value "test".
I want that the error should not appear at that time, they should be able to update that record page, as they havnt changed or assigned the picklist value "test" at industry field.
Kindly advise
4 respuestas
PS. You don't want to use an OR statement with NOT or <> because a User Detail record can only have 1 Username, 1 User Profile, 1 User Role, etc...
For example if you wanted to block any other User with Profile <> X, Y, Z from doing something and:
Joe has $Profile.Name = Q
Moe has $Profile.Name = X
Larry has $Profile.Name = Y
Curly has $Profile.Name = Z
If your Formula uses Logic like this:
OR(
$Profile.Name <> "X",
$Profile.Name <> "Y",
$Profile.Name <> "Z",
)
Joe is blocked because Q is <> X or Y or Z
great!
BUT...
Moe is also blocked because X is <> Y or Z
Larry is also blocked because Y is <> X or Z
Curly is also blocked because Z is <> X or Y
So now every User is blocked, not just the one's you want (and that's not so great)
Unless the User is Schrodinger's Cat, then all bets are off...