I have an analytic app that anonymises specified columns in an excel file for a user. When the app is run the user is given the four options in fig.1 below. In step 1 they select the file they wish to have anonymised, in step 2 they indicate which row number the headers are in (as the headers may not always be in the first row), in step 3 they input a second .xlsx file which contains the column headers for the columns they want anonymised, and in step 4 they choose a destination to save the output. I use a file browse tool and a text box tool accompanied by action tools for steps 1 & 2 to allow the user to choose their file and update the data import line for the purpose of the app, see fig. 2.
My issue is that originally I only allowed .xlsx files to be used as inputs into step 1 however now I would like .csv & .xlsm apps to be used. I updated the Arbitrary File Specification to allow for .csv & .xlsm type files in step 1 however step 2 in the app doesn't seem to work for the csv & xlsm file types. If I input a .csv or .xlsm file into step 1, the data import always starts on row 1 regardless of what row number I have put into step 2. Is there a way that will allow me to change the data import start line regardless of which three file types are used?
Thanks in advance for any help!
Fig.1
Fig. 2
Solved! Go to Solution.
From what I see, you are only replacing the path name, while you probably should also replace the File Format if a user selects a .xlsm or .csv file.
Hey @davidnolan, my first thought here is that I don't think this will be possible (without perhaps some XML hacking) in a single tool/container approach. When you change the Input type (i.e. .xlsx to .csv), the Input Data tool itself actually changes in the sense that the configuration options completely change to those that are specific for that file type, as seen under the FormatSpecificOptions part of the action tool:
So if you set it up for one file type, then change this when running your app, Alteryx won't know which part of the Input Data tool to reference and change.
One option I can think of is perhaps using a different container for each Input file type. Then use radio buttons to select one and disable the container holding the others, so that only the necessary Input Data tool is ran and will feed into the rest of your app. You'll have to configure the Action tool of your text box to feed into all 3 so that it updates whichever one ends up running.
Thank you very much for this! Using radio tools on three separate containers to select/disable the chosen file type resolved my issue