Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Dear community,
Is there a simple solution to list the part positon instead of the part index in a multilevel BOM?
I mean, with &rpt.index we got:
1 (level 1)
2 (level 1)
3 (level 2)
4 (level 2)
5 (level 1)
6 (level 1)
And in fact, I need :
1.0
2.0
3.0
3.1
4.0
5.0
So we can see that 3.0 and 3.1 belong to a sub-assembly.
Thanks
Pascal
A have the same task and found a way. Need open relations in repeat region:
1) Add parameters to repeat region
RPT_INDEX
RPT_LEVEL
POZ = ""
POZ1 = 0
POZ2 = 0
POZ3 = 0
POZ4 = 0
POZ5 = 0
OLDINDEX = -1
LEVEL = 0
2) Add relations
/*--Reset counters if starts from first line in table IF rpt_index == 1 POZ1 = 0 POZ2 = 0 POZ3 = 0 POZ4 = 0 POZ5 = 0 POZ = "" OLDINDEX = -1 ENDIF LEVEL = rpt_level IF OLDINDEX != rpt_index /*1 IF LEVEL == 1 POZ1 = POZ1 + 1 POZ2 = 0 POZ3 = 0 POZ4 = 0 POZ5 = 0 OLDINDEX = rpt_index ENDIF IF LEVEL == 2 POZ2 = POZ2 + 1 POZ3 = 0 POZ4 = 0 POZ5 = 0 OLDINDEX = rpt_index ENDIF IF LEVEL == 3 POZ3 = POZ3 + 1 POZ4 = 0 POZ5 = 0 OLDINDEX = rpt_index ENDIF IF LEVEL == 4 POZ4 = POZ4 + 1 POZ5 = 0 OLDINDEX = rpt_index ENDIF IF LEVEL == 5 POZ5 = POZ5 + 1 OLDINDEX = rpt_index ENDIF POZ = itos(POZ1) IF POZ2 > 0 POZ = POZ + "." + itos(POZ2) ENDIF IF POZ3 > 0 POZ = POZ + "." + itos(POZ3) ENDIF IF POZ4 > 0 POZ = POZ + "." + itos(POZ4) ENDIF IF POZ5 > 0 POZ = POZ + "." + itos(POZ5) ENDIF ENDIF /* 1
3) Insert in position column
&rpt.rel.POZ