Alteryx Designer Desktop Discussions

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

file name as a prefix to headers

wonka1234
10 - Fireball

Hi,

 

I want to input my file name into the headers - how can I do this? I already output file name as field.

 

Sample data - 

 

CompanyCityDepositsFileName
xyzToronto100000standard_recon_test5
xyyzToronto200000standard_recon_test5
abcMontreal100000standard_recon_test5
defMontreal5000000standard_recon_test5

 

expected output - 

 

standard_recon_test_5_Companystandard_recon_test_5_Citystandard_recon_test_5_DepositsFileName
xyzToronto100000standard_recon_test5
xyyzToronto200000standard_recon_test5
abcMontreal100000standard_recon_test5
defMontreal5000000standard_recon_test5

any help would be appreciated.

1 REPLY 1
DataNath
17 - Castor

Hey @wonka1234, it feels like I may be missing a simpler way but if not then here's how I'd go about this to ensure it's fully dynamic:

 

Transpose, grouping on FileName:

 

DataNath_0-1686168144015.png

 

Generate the new field names like so:

 

DataNath_1-1686168163396.png

 

Use a Dynamic Rename tool, making the original name your lookup and replacing them with your newly-made header:

 

DataNath_2-1686168200540.png

 

Workflow attached.

Labels