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

Alteryx Designer Desktop Discussions

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

Dynamic Sequence for Name Column

BRRLL99
11 - Bolide

Hi 

I have following dataset, I would like to create dynamic sequence based on RecordID, since new data can be added I would like to have dynamic sequence.

 

Input: New values can be added to Right_z_aitm(2,3,4,5, and so on) it should pick dynamically and add continuous numbers 

 

RecordIDName
1od z_ritm
1od z_aitm
1od z_qna
1z_aitm
1z_qna
2od z_ritm
2od z_aitm
2od z_qna
2z_aitm
2z_qna
2Right_z_aitm
2Right_z_qna
3od z_ritm
3od z_aitm
3od z_qna
3z_aitm
3z_qna
3Right_z_aitm
3Right_z_qna
3Right_z_aitm2
3Right_z_qna2

 

Expected Output:

RecordIDName
1od z_ritm
1od z_aitm
1od z_qna
1z_aitm
1z_qna
2od z_ritm
2od z_aitm
2od z_qna
2z_aitm
2z_qna
2z_aitm2
2z_qna2
3od z_ritm
3od z_aitm
3od z_qna
3z_aitm
3z_qna
3z_aitm2
3z_qna2
3z_aitm3
3z_qna3
9 REPLIES 9
BRRLL99
11 - Bolide

Hi

I have completed few steps, I would like to start from 2 based on recordID and continue

workflow has been attached please check

 

DavidSkaife
13 - Pulsar

Hi @BRRLL99 

 

I've expanded it a little and this seems to work:

 

DavidSkaife_0-1684919031548.pngDavidSkaife_1-1684919055390.png

 

Split the stream into two using the Unique tool, on RecordID and Name. Tile the duplicates using Unique Value on Name, grouping by RecordID, then add the Tile Sequence Num to the end of the Name field (and adding 1 to the sequence to account for it being the second instance of the Name).

 

Union it back together to the Unique output, sort, remove unwanted fields.

 

Hope this helps

 

 

flying008
15 - Aurora

Hi, @BRRLL99 

 

Try this way:

 

录制_2023_05_24_17_11_37_418.gif

 

Input  Output 
RecordIDName RecordIDName
1od z_ritm 1od z_ritm
1od z_aitm 1od z_aitm
1od z_qna 1od z_qna
1z_aitm 1z_aitm
1z_qna 1z_qna
2od z_ritm 2od z_ritm
2od z_aitm 2od z_aitm
2od z_qna 2od z_qna
2z_aitm 2z_aitm
2z_qna 2z_qna
2Right_z_aitm 2z_aitm2
2Right_z_qna 2z_qna2
3od z_ritm 3od z_ritm
3od z_aitm 3od z_aitm
3od z_qna 3od z_qna
3z_aitm 3z_aitm
3z_qna 3z_qna
3Right_z_aitm 3z_aitm2
3Right_z_qna 3z_qna2
3Right_z_aitm2 3z_aitm3
3Right_z_qna2 3z_qna3
BRRLL99
11 - Bolide

Could you please show 

Step by step process of tools for formula's i can apply

DavidSkaife
13 - Pulsar

You can download the Alteryx file i created, which was attached to the reply. Following that should give you the guide as to what i did

BRRLL99
11 - Bolide

new data has been added

DavidSkaife
13 - Pulsar

Hi @BRRLL99 

 

You can add another section to the Formula tool, taking note you will need to include the space after right_old

 

DavidSkaife_0-1684923370117.png

 

BRRLL99
11 - Bolide

 

..

flying008
15 - Aurora

Hi, @BRRLL99 

 

 

Step by step for all tools.

 

录制_2023_05_25_07_50_32_527.gif

Labels