Alteryx Designer Desktop Discussions

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

Create a Counter column in alteryx

arsh011
Asteroide

I want to create a counter column in my table each time my workflow runs, for example, i want to start with 10001 as my first number then next time my workflow runs it changes to 10002 for the same column.

 

counter 

10001

10001

10001

 

next time when I run the workflow it changes to 

10002

10002

10002

 

please help I want to include that column in my table.

 

8 RESPUESTAS 8
NikyN
Cometa

Hello @arsh011,

 

are you storing the outputs with '10001' columns somewhere? If yes, than easily just to add formula, and ToNumber(RunCount)+1 should works for your. In case that you are not storing this information anywhere, I believe you will need to create specifically for this column create tracker stored somewhere --- to track it.

 

 

Best Luck!

Niky

atcodedog05
22 - Nova
22 - Nova

Hi @arsh011 

 

Also when you say it needs to start from 1001 does it need to reset everyday or something?

binuacs
Arturo

@arsh011 One option I am thinking was keep the counter in an excel file and update using a formula tool each time when you run the workflow. Keep the counter value 10001 in excel when the workflow run first time it will update to 10002 and output the updated value in the same excel

binuacs_0-1645097359434.png

 

Qiu
20 - Arcturus
20 - Arcturus

@arsh011 
I think we can use an Excel file as a storage as below

0217-arsh011.PNG

arsh011
Asteroide

thanks @Qiu  but i want to append this file with the existing file with new counter number.

for eg :

sample.xlsx        desired sample.xlsx

Counter               Counter

1002                    1002

1002                    1002

1002                    1002

                            1003

                            1003

                             1003

arsh011
Asteroide

@atcodedog05  no it just appends with 1002 next time when the workflow runs in the same column

arsh011
Asteroide

I am also getting the error when I change the output tool configuration from overwriting file to appending to existing file .

 

arsh011_0-1645102555519.png

 

binuacs
Arturo

@arsh011 IF you want to append the counter in your output then use an append tool and write in your output to a different file. The counter file should be keep it separate

 

binuacs_0-1645103552132.png

 

 

 

Etiquetas