Apr 27, 2022 08:44 AM
I want to assign a value to each record based on the 2nd level record it is related to in the org chart. This question is similar to the question posed here but instead of adding salaries, I want to have a column where everyone under “Tamara Muro” is assigned “Tamara Muro”, everyone under “Keith Shearin” is assigned “Keith Shearin” and so on. One of the commenters suggested using a script but I wouldn’t know where to get started with that. Is there not a way to use a lookup with a looping function to keep climbing the org chart until it lands on one of these names?
I also tried this solution but with all the levels in my org chart, this isn’t sustainable.
Thank you for your help!
Apr 28, 2022 12:16 AM
Hi Anna, I’ve attempted to figure out how to do this with lookups and rollups, but it feels like the main issue is the records aren’t directly linked, and so lookups and rollups wouldn’t work (as far as I can tell, anyway!)
I’ve put together a script that accomplishes what you’re looking for that can be found here
It’ll ask you to select the following:
Let me know if I can help with the implementation into your base!
Apr 28, 2022 09:38 PM
Hi Adam, thanks for the helpful script. What I’m wondering is how I might be able to also include a column that displays the “level” of the hierarchy for each record; for instance, in your example, if there were a “Level” column, “A” would return “1,” since it doesn’t have a parent, and “I” would return “5” since the branch is I->H->G->B->A. I figure it would involve a counter within the loop, but I’m a newbie and could use some help with syntax.
Thanks for your help!
Apr 29, 2022 09:41 PM
Hi Juliet! I’ve updated the base to handle the case you’re talking about, do have a look when you’re free