Skip to main content
Planview Customer Success Center

CurrentUser Function

CurrentUser () as Object

Category: ObjectReference
Description: Returns the current user object
Supported Context: BusinessRules
Returned value as Object Returns the current user object
Example #1

Build a validation rule on the User Entity "Add" operation that will prevent non-admin users from inviting new users into the organization. Set the Evaluation Criteria to be:

Not(CurrentUser().Admin)

Example #2

Build a validation rule that will prevent the deletion of approved timesheet entries by users that are not set as the approver of the timesheet itself. Build the validation rule on the TimeSheet entity and set its Evaluation Criteria to be:

($State = "Approved")&& (CurrentUser()<> $ApprovedBy)

Tips
  • The CurrentUser() function ca only be used on business rules
  • You can get the current user's properties by using the CurrentUser().FieldAPIName syntax, such as CurrentUser().Admin, CurrentUser().DirectManager