Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

header names change each time workflow is ran

sericson
8 - Asteroid

I have a file that the headers change each time the file is ran. I need to remove the columns labeled as "field" but I'm not sure how to do that when the numbers keep changing each time. 

 

1st run

Field_16_10SSNLast NameField_16_2Field_16_3SourceField_16_4Field_16_5Fund IDField_16_6Field_16_7Field_16_8

 

2nd run

Field_18SSNField_18_2Last NameField_18_3Field_18_4SourceField_18_5Field_18_6Fund IDField_18_7Field_18_8Field_18_9
6 REPLIES 6
binuacs
21 - Polaris

@sericson use the dynamic select tool to exclude the fields starting with Field

image.png

alexnajm
18 - Pollux
18 - Pollux

Dynamic Select should do the trick! !Contains([Name], "field")

 

Edit: @binuacs beat me to it 😃

OTrieger
14 - Magnetar

@sericson 
Another way will be to use Select Tool, and tick those fields that you need and keep the Unknown unticked, in this was Alteryx will keep only those fields that you need and will remove any new fields that keep changes.

sericson
8 - Asteroid

thank you! both of these ways work, however, I did forget that 2 of the columns with the "field" names have information that I need. I can't change the header name due to the changing "field" names. how can I overcome this?

nagakavyasri
12 - Quasar

@sericson One way is to add the field names that you need in the Dynamic Select tool by explicitly mentioning them.

 

Screenshot 2024-11-05 142400.png

CoG
14 - Magnetar

If the fields you want to remove have only null values, then you can use the Data Cleansing tool to "Remove null columns". Otherwise, how do you know which fields that are named "field..." you want to keep?

Labels
Top Solution Authors