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

How to update the column header in table tool

Sshasnk
8 - Asteroid

I have to update the column name from the user input, I can't update it before the table tool because I have to apply the formula on that column.

 

Example:

 

I have to change the CCY to the currency entered by the user 

 

Input for table tool:

 

FundCost CCY Post CCY
ABC123 145
BDC345 456

 

If the user inputs EUR it should replace CCY with EUR in table tool or after table tool

 

FundCost EUR Post EUR
ABC123 145
BDC345 456
5 REPLIES 5
ShankerV
17 - Castor

Hi @Sshasnk 

 

Please find the below solution.

ShankerV_0-1671526356487.png

 

ShankerV_0-1671526072545.png

 

Input was:

ShankerV_1-1671526109107.png

 

Workflow:

ShankerV_2-1671526133187.png

Step 1:

ShankerV_3-1671526149116.png

 

Step 2:

ShankerV_4-1671526175940.png

 

Step 3:

ShankerV_5-1671526189767.png

 

Step 4: Dynamic rename

if contains([_CurrentField_],'CCY') then replace([_CurrentField_],'CCY','<TempCCY>') else [_CurrentField_] endif

 

ShankerV_6-1671526210330.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

 

Sshasnk
8 - Asteroid

@ShankerV  Hi, I mentioned above I have to do it in the table tool or after it, I can't do it before because my formula won't work if I change the name before the table tool :)

ShankerV
17 - Castor

Hi @Sshasnk 

 

One way to do this in the table tool is as below.

 

ShankerV_0-1671526986562.png

 

Input was:

ShankerV_1-1671527010012.png

 

ShankerV_2-1671527039470.png

 

Kindly accept this solution if it provided a solution to your question.

 

Many thanks

Shanker V

 

 

Sshasnk
8 - Asteroid

@ShankerV  Hi I am not sure I am not able to explain the issue, but the rename should be dynamic and the user should give the currency and should be updated in table tool. The way you showed is where developer is hardcoded it

Christina_H
14 - Magnetar

You need to use two action tools to update the aliases of both columns in the table tool:

Christina_H_0-1671528671473.pngChristina_H_1-1671528753343.png

 

You need to run the workflow as an app to see the names change

Christina_H_2-1671528793398.png

 

Labels