Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Auto assign unique ID based on another field

Ylin0615
7 - Meteor

I would like to find out if I can use Alteryx to assign unique ID based on the criteria below:

 

ID format: Project value + 2 digits (0-9,A-Z)

ProjectID
AA00
BB00
CC00

 

 

Thanks!

Betty

4 REPLIES 4
Qiu
21 - Polaris
21 - Polaris

@Ylin0615 
My understanding is that you want to assign the sequencen number for each project then form the ID,

We can use the Tile tool to generate the Sequence number or Record tool if you are using a recent version of Alteryx.
Or we can generate some randome numbers to form the ID as below.

0512-Ylin0615.png

ChrisTX
16 - Nebula
16 - Nebula

In the Preparation category, try the RecordID tool.  See attached workflow.

 

Chris

Ylin0615
7 - Meteor

Thank you for the reply and sorry I wasn't clear.

 

Since there are total 3 chars for the ID field. the first char is project ID so I only have 2 digit left as ID assignment.

My issue started when over 100 items if only use number.

 

Is there a function to combine letter and number?

So when running out of numbers, e.g.A99. the next one will be AA0 (or AA1) , it also need to be unique within the same project.

 

DataOption1Option2
ProjectitemID1ID2
A1A00A01
A2A01A02
A91A90AA1
A92A91AA2
A93A92AA3
A94A93AA4
A95A94AA5
A96A95AA6
A97A96AA7
A98A97AA8
A99A98AA9
A100A99AB1
A101AA0AB2
A102AA1AB3
A103AA2AB4
A104AA3AB5
A105AA4AB6
A106AA5AB7
A107AA6AB8
A108AA7AB9
A109AA8AC1
A110AA9AC2

 

Qiu
21 - Polaris
21 - Polaris

@Ylin0615 
I think there must be a smart way, but I I managed to do it like below with the fuction "IntFromChar".

0512-Ylin0615-r1.png

Labels
Top Solution Authors