Help

Parent Child tree hierarchy

Topic Labels: Extensions
Solved
Jump to Solution
5909 11
cancel
Showing results for 
Search instead for 
Did you mean: 
Anirudh_Subrama
4 - Data Explorer
4 - Data Explorer

Hi… I’m looking for a scripting solution that lets me auto-populate a field with a parent and child relationship.
Eg -
Column 1 has the children
Column 2 has the parent of the child

Screen Shot 2021-11-03 at 12.51.14 PM

I’m wondering if I can write a script that can populate a new column with the tree hierarchy like this -

wco:WC Interface → wco:Area → wco:Block → wco:Image Card → wco:Hero Image Card

I have looked at a solution posted by joao_melo which works.
But i’m wondering if this is doable in a script?

11 Replies 11
Ed_Goble1
5 - Automation Enthusiast
5 - Automation Enthusiast

If you mean the “level” eg 1 for a top level, 2 for a child, 3 for a grandchild etc - then one option I use is just taking the path field from the script above, and using a basic formula which does a count on the separator? Eg “—>” or “.” in the examples above. Then you just have one script to run. 

Thanks a lot. I was able to do it using that approach!