For manually securing object or doing some kind of filtering, it is regularly useful to know what roles a person has in their user profile. Peoplesoft provides a global variable to give you access to the person’s roles.
Example:
Local array of string &Roles;
Local integer &I;
&Roles = %Roles;
&doTransfer = True;
For &I = &Roles.Len To 1 Step - 1
If &Roles [&I] = "My Special Role" Then
&doTransfer = False;
End-If;
End-For;
2 comments:
You could also use
If IsUserInRole("rolename") Then
Abosultly agree, thanks for point that out! But for some reason I have had limited success with that function. Using the loop also gives a little for flexability...
Thinking multiple matches and/or complex logic....
Post a Comment