Count number of parent for Unstructured List

Options
PratyakshDua01
PratyakshDua01 Member, ALL USERS, GroupMember, Partner, Community Member, Certified Model Builder Posts: 5 Contributor

Hi Team,

I am trying hard to calculate the number of parents for individual list items for unstructured list items.

Kindly let me know in case of an optimized formula

IF NAME(PARENT(ITEM(Region_Group))) = "All Regions" THEN 1 ELSE IF NAME(PARENT(PARENT(ITEM(Region_Group)))) = "All Regions" THEN 2 ELSE IF NAME(PARENT(PARENT(PARENT(ITEM(Region_Group))))) = "All Regions" THEN 3 ELSE 4

this is not going to work if I add any other list item for more levels.

Thanking you in anticipation.

Comments

  • PratyakshDua01
    PratyakshDua01 Member, ALL USERS, GroupMember, Partner, Community Member, Certified Model Builder Posts: 5 Contributor

    Hi @JaredDolich,
    Thanks for your response, I would be very happy if you can share one example of this because I tried but bcos of the unstructured list it's creating issues.

  • PratyakshDua01
    PratyakshDua01 Member, ALL USERS, GroupMember, Partner, Community Member, Certified Model Builder Posts: 5 Contributor

    Hi @rob_marshall 

    Thanks for your response, yes I will make sure to avoid the nested parent functions.