The CreatorCon Call for Content is officially open! Get started here.

Possible to search user hierarchy via script?

JJG_SNOW
Mega Guru

I am trying to create a script that can see if a user falls anywhere bellow another user in the employee hierarchy. 

 

For example: I want to see if Jane Smith is below John Doe in the employee hierarchy. That means that if Jane's manager is John Doe, or if Jane's manager's manager is John doe, the script would return true. Otherwise it would return false. The script would check all the way up the hierarchy and look for a match with John Doe.

 

The "Show Employee Org Chart" link at the bottom of a user's HR profile breaks down the hierarchy visually, but i don't know how to turn that same functionality into a script. Any help is appreciated. 

 

JohnGilmore_2-1691697501287.png

 

 

1 REPLY 1

Muskan Dixit
Tera Contributor

Hi, I am also looking for something similar, did you get any solution for the same?