Are you sure? It's been a long time since I had my logic class, but your original code looks correct to me. If I understand your statement, you need the condition to be true if the user is not a member of a particular group or if the workstation name is a given name.

So simple truth table:

 Code:
In Group    PCNAME=
0           0
0           1
1           0
1           1


If we NOT the In Group and then or the results:

 Code:
Not In Group   PCNAME=   OR
1              0         1
1              1         1
0              0         0
0              1         1


Which is what Allen pointed out. If the person is not in the group, the condition is met. If the person is in the group and the workstation name is the given pcname, the condition is met. If the person is in the group and the workstation name is not the given pcanme, the condition is not met. That seems exactly correct.

Looking at Lonk's code would give (remember we are first OR'ing the values and then NOT'ing the OR'd value):

 Code:
In Group    PCNAME=   OR   NOT
0           0         0    1
0           1         1    0
1           0         1    0
1           1         1    0


Which says the condition is only met when the person is not in the group and the workstation name is not pcname.

Did I miss something?