Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Retain provided field names when mapping file browse tool

michalikm
7 - Meteor

Hello all!

I'm using a file browse to navigate to an xlsx file that can have an unspecified number of columns, but the workflow only cares about 3 columns of data that are being mapped by the file browse tool. I would like to know if it's possible to retain the provided column headers for those 3 mapped columns, instead of them being overwritten by the column headers we have within our input tool? I know the dynamic rename tool exists, but I don't know how to apply it to this scenario since the field mapping overwrites the provided column headers. Any help or thoughts would be greatly appreciated!

5 REPLIES 5
BS_THE_ANALYST
15 - Aurora
15 - Aurora

Hi @michalikm

 

May just be me, but I'm struggling a little bit to picture the problem you're describing. 

 

You're using a file browse to navigate to an xlsx file? (input or output)? I don't often use a file browse but I just thought it's a way - for a macro or an app - to change the file input or file output. 

 

If you're saying that your workflow has a dependency on three columns & that you suspect a user may select a file that doesn't contain these three columns & you want to force them into your workflow irrespective if they are contained in the selected file, you can do the following:

 

Let's pretend I'm using a formula tool that's referring to a column in a file that doesn't exist, it'll spit out an error like so:

Screenshot 2025-04-03 203915.png

 

We can be sneaky and just force the columns to exist though with the following trick:

 

Screenshot 2025-04-03 204124.png

 

Here, we put a text input on the canvas. We put our field names in the text input as it'll force them to be persistent on the canvas. Use a sample tool to get rid of the dummy rows of data and this will only retain the column headers. If you want specific column datatypes forced as well as the names, consider using a Select tool after the Sample tool or consider putting relevant dummy values in the text input underneath the column headers (the text input will infer the datatypes based on the column contents)

 

If I've missed the mark, could you explain your problem again or hopefully someone else can understand the request.

 

All the best,
BS

LinkedIN

Bulien
michalikm
7 - Meteor

My apologies, I'm not the best at explaining (or understanding) Alteryx.

I've provided a simplified version of the workflow, but to hopefully better describe the scenario:

  • The user would input a file via the File Browse that requires three fields to be mapped.
  • The workflow expects there to be three columns: a column related to geography and two columns to deduplicate by.
  • Most of the time, the user input will have significantly more than 3 columns, but the workflow is built around deduplicating via a geography column and two user-defined columns.
  • I would like to see if it's possible to retain the headers from the users original input (instead of GEOGRAPHY, DEDUPLICATE1, and DEDUPLICATE2)


    Screenshot 2025-04-03 183813.png

 

Hopefully this makes a bit more sense!

PangHC
12 - Quasar

@michalikm 
from the workflow, it has no issue to retain extra headers.

but, since it simplified workflow, i believe it pass through transpose or crosstab or summarise or other tools that can't retain extra header beside configuration.

 

the simplest way is add recordId in beginning and use join tool in the end. 

Screenshot 2025-04-04 114054.png

michalikm
7 - Meteor

Correct, the workflow has no issue passing through the additional headers. I need the workflow to retain the user-defined headers for the 3 columns being mapped, not how they are listed in our template (GEOGRAPHY, DEDUPLICATE1, DEDUPLICATE2). The purpose of the workflow will be different for each user, so I would like them to be able to retain their original column names on the output if possible. Is this possible when generating a field map on a file browse?

 

As an example -- 

User inputs a file with column headers "ZIP", "STORE", "RATE". Is there a way to retain those headers for our output, since the fields are mapped as "GEOGRAPHY", "DEDUPLICATE1", and "DEDUPLICATE2"? 

PangHC
12 - Quasar

@michalikm 
i can't think anyway.

but you can try to do utilize list box. 

it more freedom, but it do fit what you want, where retain the original field name.

Screenshot 2025-04-07 144007.png

Labels
Top Solution Authors