Forum Discussion
justlogmein
Helper III
3 years agoCreate a numbered index column from an indented hierarchy (for BOMs)
I am trying to do the reverse of what many others seem to be trying to do. I have an output of a list of parts that uses spaces to indicate what level they are at under the parent assembly above. I w...
KeyurPatel14
Responsive Resident
3 years agohii justlogmein ,
Can you please provide input in text format and output also so that I can understand the question?
justlogmein
Helper III
3 years agoAll of the info is already there. The input is an indented list, so there are are a number of spaces until the words, which designate the level. The part's parent part is the one on the previous indentation directly above it. The output column I have included in the M code already above. It is a numbered list which outlines which parents it has come from.
You can see below that the Ring and Pin are under the Piston assembly, which are under the Engine assembly, which are under the Car assembly. And the Housing and Gear are under the Gearbox assembly, which is under the Car assembly.
Input:
Part Name
| Car |
| Engine |
| Piston |
| Pin |
| Ring |
| Gearbox |
| Housing |
| Gear |