Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Use number of indents to produce a numeric outline to produce a unique id

hellyars
13 - Pulsar

Hi,

This is pretty messy.  I have a Build Of Materials (BOM).  Part Numbers are not unique IDs.  Parts, such as a bolt, may be used multiple times across the BOM.  I want to compare different iterations of the BOM, so Record ID will not work across iterations.  The BOM is indented.   The indentation references + the part number are still not unique.  They could be, if I could convert the Indent reference to a number outline.  

 

Here is an example of what I want to do.  In reality, there are 82,000 lines and up to 12 indent references.  

  

How can I construct a formula to create this translation?

 

Indent Reference Desired Outline ID
11
1,11.1
1,1,11.1.1
1,1,11.1.2
1,1,1,11.1.2.1
1,11.2
1,1,1

1.2.1

1,1,11.2.2
12
1,12.1
1,1,12.1.1

1,1,1,1

2.1.1.1

1,1,1,1

2.1.1.2

1,1,1,1,1

2.1.1.2.1

1,1,1,1,1,1

2.1.1.2.2.1

1,1,1,1,1,1

2.1.1.2.2.2
5 REPLIES 5
Greg_Murray
12 - Quasar

@hellyars 

 

this works for the example you have below with the exception of the last couple rows. You may have to tweak the iterative macro to work with your actual data. 

 

Greg_Murray_1-1598303848145.png

 

hellyars
13 - Pulsar

@Greg_Murray  First, thank you.  Two, sorry for not responding earlier.  Three, this works perfectly.  My example is what is off.  The last two rows in my desired outline example are incorrect.  Awesome!  Now, I have to study this macro.  

hellyars
13 - Pulsar

@Greg_Murray   HELP.   It only works within your file.  It stops working if I try to bring the macro into another workflow (to include a new workflow).  The only way I can get it to work is to import my workflow into yours.   What am I doing wrong?

Greg_Murray
12 - Quasar

@hellyars can you screenshot what you are seeing and/or share a sample of the workflow you are trying to use it in?

hellyars
13 - Pulsar

@Greg_Murray  Thanks for the quick response.  I will have to wait for it to happen again.  I deleted the corrupt version and restarted with a clean copy of your example.  So far, it is working.  But, this has happened several times.  Next time I will document it.  

Labels
Top Solution Authors