Forum Discussion

Oleander's avatar
Oleander
Icon for Helper I rankHelper I
2 years ago
Solved

Address the Component status as a Parent or a child depending on Hierarchy Path

I have a BOM and want to set  a Parent or a child status due to position in a Hierarchie Path:

LevelCompParentImm ParentHiarchy
Parent101101 101
11002101101101|1002
.210081011002101|1002|1008
11003101101101|1003
.210091011003101|1003|1009
.210081011003101|1003|1008
11010101101101|1010
11004101101101|1004
.210111011004101|1004|1011
.210051011004101|1004|1005
..310121011005101|1004|1005|1012
..310131011005101|1004|1005|1013
.210051011004101|1004|1005
..310071011005101|1004|1005|1007
...410141011007101|1004|1005|1007|1014
...410151011007101|1004|1005|1007|1015
...410161011007101|1004|1005|1007|1016
...410171011007101|1004|1005|1007|1017
..310181011005101|1004|1005|1018
..310191011005101|1004|1005|1019
..310201011005101|1004|1005|1020
11021101101101|1021

 

I want to address the Component status as this :

 

LevelCompParentImm ParentHiarchyComp Status
Parent101101 101Parent
11002101101101|1002Parent
.210081011002101|1002|1008Child
11003101101101|1003Parent
.210091011003101|1003|1009Child
.210081011003101|1003|1008Child
11010101101101|1010Child
11004101101101|1004Parent
.210111011004101|1004|1011Child
.210051011004101|1004|1005Parent
..310121011005101|1004|1005|1012Child
..310131011005101|1004|1005|1013Child
.210051011004101|1004|1005Parent
..310071011005101|1004|1005|1007Parent
...410141011007101|1004|1005|1007|1014Child
...410151011007101|1004|1005|1007|1015Child
...410161011007101|1004|1005|1007|1016Child
...410171011007101|1004|1005|1007|1017Child
..310181011005101|1004|1005|1018Child
..310191011005101|1004|1005|1019Child
..310201011005101|1004|1005|1020Child
11021101101101|1021Child
  • Sorry , I didn't see it myself:

    "=if(BOM[Level]="Parent";"Parent";IF(CONTAINS(BOM;BOM[Imm Parent];BOM[Comp]);"Parent";"Child"))"

1 Reply

  • Sorry , I didn't see it myself:

    "=if(BOM[Level]="Parent";"Parent";IF(CONTAINS(BOM;BOM[Imm Parent];BOM[Comp]);"Parent";"Child"))"