Use this function to get the currently logged in user's access rights level. The value returned is in the range 0-9. Zero represents the highest level and nine represents the lowest level. Access rights levels are specific to each system implementation.
There are no parameters for this function.
This function is only useful if the system is set up to require user IDs and user rights.
Here is an example:
(Assume the current user is TOMJ with an access rights level of 7.)
Function |
Result |
Explanation |
#result=UserLvl ( ) |
7 |
Determines that TOMJ's user rights are 7 and returns a 7. |
IF (UserLvl( ) !=0) MSG(USERID( ), "Remember to get a supervisor to approve this transaction."); END; |
TOMJ Remember to get a supervisor to approve this transaction. |
First UserLvl determines that TOMJ's rights level does not equal zero (0). Then the MSG procedure creates a window and displays the given message along with the current user ID (TOMJ) returned by the UserID function. |
© Copyright 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices