Alteryx Designer Desktop Discussions

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

Providing Unique Reference for new items

PassION_es
10 - Fireball

I have a dataset where each new items will be given a unique reference number. I want the new items to be recorded with a new reference number following the last reference number. Please see below example

 

 

Input file:

 

Existing Record

Name - Reference

Aela  - AM000097

Erza -  AM000098

 

 

New Items to be Added in the Record:

Cloud 

Lexy 

 

 

Output in Alteryx:

Name - Reference

Aela  - AM000097

Erza -  AM000098

Cloud - AM000099

Lexy - AM000100

 

Each should have an alpha-numeric characters of upto 8 characters only (AM000000).

 

Thank you in advance.

 

 

3 REPLIES 3
flying008
14 - Magnetar

Hi, @PassION_es 

 

FYI.

 

 

 

IIF(IsEmpty([Reference]), Left([Row-1:Reference], 2) + PadLeft(ToString(ToNumber(Right([Row-1:Reference], 6)) + 1), 6, '0'), [Reference])

 

 

 

录制_2024_07_23_16_51_48_575.gif   录制_2024_07_23_16_55_39_967.gif

binuacs
21 - Polaris

@PassION_es one way of doing this

image.png

PassION_es
10 - Fireball

thank you @flying008 and @binuacs 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels