Alteryx Designer Desktop Discussions

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

Let user map columns via app

MagnusShade
7 - Meteor

Hi everyone,

 

I realise this question has been asked before, and I've tried several solutions from here, but somehow I can't get them to work for me. My only wish is to be able to let the user map the columns of their data coming in to our data model so we can then dynamically analyse everything correctly, even if the columns originally had different names.

 

So user workflow:

  • User selects file
  • User tells Alteryx which column is for date
  • User tells Alteryx which column has "Profit"

 

This is sort of what my workflow looks like right now:

MagnusShade_0-1623275667679.png

I attached the example; ideally I would have 5 options for 5 columns that need to be mapped/renamed.

 

I'd be super grateful for any help!

 

Cheers,

M

20 REPLIES 20
Qiu
20 - Arcturus
20 - Arcturus

@MagnusShade 
I believe you are almost there.

Capture1A.PNGCapture1B.PNG

MagnusShade
7 - Meteor

Hi, thank you so much for responding!

 

Unfortunately, I can't seem to open your workflow because it was created using a newer version? Oh man 😞 I am on version 2019.3.1.24384..

 

Also, I see that you connected it directly to the filter tool. This was just supposed to be an example for what I need to do later with some of the columns that need to be assigned/mapped by the user - not every column will be used, some just need to be reassigned so they can be exported using the standard data model, and later be connected to Tableau and some other tools. Is it possible to just show 5 drop downs for each of the 5 columns that need to be reassigned?

 

Thanks again!

mceleavey
17 - Castor
17 - Castor

@MagnusShade ,

 

can you give some more information as to what you want? I'm not sure what you mean by "reassigned".

Are you wanting them to just be able to select the fields they want?

Can you provide the data with a before and after so we can see what your expectations are?

 

Thanks,

 

M.



Bulien

MagnusShade
7 - Meteor

@mceleavey , of course! 

 

I'm creating a sampling tool with different functionalities and an interface. The workflow will draw the 5 rows with the highest profits and then automatically add a random sample of as many rows as needed for the population (through a macro). 

 

The only problem is that the columns can have different names - e.g. sometimes, the profit column will be called "Profit", sometimes "Sum", sometimes "YTD", etc. - it's not something I can make a rule for beforehand, so I want to include 5 drop downs in the interface where the app asks the user "Please select the profit column", "Please select the date column" (there are multiple date columns, so even finding the date column automatically won't work), "Please select the category column" etc. The user can then select the specific columns and they will be renamed in the background so that "Sum", "YTD" etc. all come out as "Profit" in the end.

 

I don't have a screenshot to show the drop down, since I haven't been able to get it to work, but here are a few examples of possible inputs and the desired output. Hope this helps 🙂 Thank you so much!

mceleavey
17 - Castor
17 - Castor


@MagnusShade ,

 

are the columns always in the same order but with different headers?

 

M.



Bulien

mceleavey
17 - Castor
17 - Castor

Hi @MagnusShade ,

 

ok, I've built an app for you which allows you to select the columns and assign them to a given template column.

I've only built it for Profit and Date, but you can simply copy and repeat the steps, it fairly straightforward.

 

mceleavey_0-1623316882026.png

 

The way it works is it feeds in the columns of the input file and you select which one you want to use as profit, for example. Then, the incoming data is transposed, and the name of the field you have selected for profit is overwritten with "Profit", the same goes for Date etc.

The data is then pivoted back and the records are stripped out leaving only the headers. The data is then unioned by it's position, which means what was "Sum" is now "Profit".

 

I hope this is what you want.

 

M.

 



Bulien

MagnusShade
7 - Meteor

Hi @mceleavey , 

 

Thank you for your help. Unfortunately, like with @Qiu , I can't open your workflow either because of the version 😞 I'm on version 2019.3.1.24384.

MagnusShade_0-1623318346804.png

 

 

So, to your question: the columns are not always in the same order. Sometimes there are 12 columns, sometimes there are 30, some are in between, etc. So it's really just supposed to take the column the user picks for each field ("Pick Profit", "Pick category", etc.) and rename it according to the data model. 🙂 

 

Hope this is understandable.

 

Many thanks!

M.

mceleavey
17 - Castor
17 - Castor

@MagnusShade ,

 

just click "ok" you can open the workflow.

 

also,

upgrade!

 

M.



Bulien

MagnusShade
7 - Meteor

@mceleavey I've clicked it of course, it won't open the workflow though. I'd love to update, unfortunately that's the latest version I'm allowed to have. 😞

Labels