How to evaluate if currentuser equal manager person field on edit form to hide section

  • 7 July 2021
  • 4 replies
  • 158 views

On edit form i have tried to validate not( userEqual(CurrentUser, Manager)) than hide section on the edit form but it is not working. Any idea?


4 replies

Userlevel 3
Badge +12

Hi,


What are the values of CurrentUser and Manager? 

Badge +11

@Pingpong You can use something like:


 


=Userprofilelookup({Common:Currentuser},"PreferredName")!={ItemProperty:Managerfield}

Badge +12

@Pingpong  your formula will not work like that. That formula works only for 1 person in the company and that will be the CEO of the # 1 person of the company. Instead of Current User, you may need to use something else e.g. created by or modified by or any other people group field from your form. I've used the formula with Created By field.


 


!equals(CurrentUser, userProfileLookup(CreatedBy,"Manager"))


 

Badge +12

@kchaluvadi values are self-explanatory in his question. CurrentUser is the person opening the form and the Manager is the Current User's manager. 

Reply