isuserinrole peoplesoft
isuserinrole peoplesoft is peoplecode function check whether user belongs to a role through peoplecode.
Syntax: IsUserInRole(rolename1 [, rolename2]. . .)
Return a Boolean value:
True if the current user belongs to one or more of the roles in the user role array,
False otherwise
For example 1:
&CheckFlag = IsUserInRole(“ROLE_NAME”)
&CheckFlag contains true if the currnet user has ROLE_NAME in his profile.
For example 2:
1 2 3 4 5 6 7 8 9 10 11 12 |
Local Rowset &MYROWSET; If IsUserInRole("ROLE_EMPLOYEE", "PERFORMANE_CK") Then &MYROWSET = GetRowset(); For &i = 1 To &MYROWSET.ActiveRowCount; &LEVEL1_ROW = &MYROWSET(&i); &Action_Reason = &LEVEL1_ROW.GetRecord(Record.JOB).ACTION_REASON.VALUE; End-For; End-If; |
References:
http://peoplesoft-erp-hcm.blogspot.com/2012/12/check-whether-user-belongs-to-role.html
https://docs.oracle.com/cd/E13292_01/pt849pbr0/eng/psbooks/tpcl/chapter.htm?File=tpcl/htm/tpcl02.htm