Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Nov 03, 2021 09:54 AM
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
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?
Solved! Go to Solution.
Apr 28, 2024 10:55 PM
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.
Apr 30, 2024 06:12 PM
Thanks a lot. I was able to do it using that approach!