Solved

Cascading Manager's Manager from Active Directory in Calculated Value

  • 20 April 2021
  • 7 replies
  • 5 views

Badge +3

I have a responsive form that the user wants to show the User's manager and the Branch Manager, Asst Director and Director.  In am able to add a calculated value for the current user to get the supervisor to populate, but I need the Supervisor's Manager to populate and then that Manager's manager to populate if possible.  Is that a possibility?

icon

Best answer by kunalpatel 5 May 2021, 16:47

View original

7 replies

Badge +8

Hi @Michelle_MOE,


can´t double check this on my end since the manager field is (unfortunately!) not populated in our environment, but I always imagined it to look something like this:



Afterwards the "all managers" variable should contain the base-user (p) + all managers.


 

Badge +3

I am not familiar with the third task.  What is that?  

Badge +8

Hi @Michelle_MOE,


 


1) Set variable


2) Loop


3) Collection operation


4) Set variable


 


You need a variable of type "collection" for the collection operation. It is set to add the variable "p" (which is of type person)


Let me know if this works

Badge +3

I am new to Nintex and still confused on exactly what to put inside each step to get the cascading managers from AD.  Can you send me a snipit of each step filled out?

Badge +12

@Michelle_MOE  if you need only 3 levels of manager then try the below steps:


 



  1. Since you're using Current User, I'm assuming you need the manager of the person creating the item. So for the Current User make sure the calculated control calculates the formula only in the new mode. The formula will be userProfileLookup(Current User,"Manager"). Name this control "ctrl_calc_UserManager"

  2. To display the user's manager's name using another calculated control "ctrl_calc_UserManagerDispName" and the formula userProfileLookup(ctrl_calc_UserManager,"PreferredName")

  3. Now for the Branch Manager i.e. User Manager's Manager use another calculated control "ctrl_calc_BranchManager" and formula userProfileLookup(ctrl_calc_UserManager,"Manager")

  4. Repeat steps # 3 and 4 for Asst. Director and Director.


Make sure all these calculated controls calculate formula ONLY in the new mode, otherwise if someone else edits or views the form, it will show wrong information.

Badge +3

That worked!  Is there any way that I can only show the Preferred Name?



 

Badge +12

@Michelle_MOE you can use same formula to get the first and last name instead of preferred name.


 


e.g. Doe, John is the user's manager, then use below in calculated control:


 userProfileLookup(ctrl_calc_UserManager,"FirstName")+" "+userProfileLookup(ctrl_calc_UserManager,"LastName") ---> John Doe


 


Also, could you please mark my reply as accepted solution?


 


Thanks.

Reply