This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Find answers, ask questions, and share expertise about Alteryx Designer.
General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!
I have build a macro. Outside the macro (in a workflow) I connected the macro input with a Input Data Tool (Test Input Tool or so) to an external data source like a csv-files.
Inside the macro I work with the incomming data and the data are going outside with a Macro Output Tool.
When I will run this functional in th Alteryx-Gallery it is not possible. Because I can't execute macros in the Alteryx Gallery.
So I have to build an Analytic-App instead.
But how is it possible to read the data from the a external data source with a File Browse Tool, work with incomming data inside the Analytic App. And get the same functionality like like my build macro?.
Hopefully I can help! As you mentioned, the File Browse is what you need. To replicate what your macro is doing, you just need to utilize the File Browse with Drop Downs! Here's an overview of the process:
1) Start by creating a workflow that does what you need with an example data file; use an actual Input tool.
2) Connect a File Browse tool to the Input tool. An Action tool will automatically appear with the correct configuration "Update Input Data Tool"
3) Connect 3 Drop Downs to the File Browse (one for A, B, and C). When you connect a Drop Down to a File Browse, the drop down will automatically populate with a list of fields from the file you select with the File Browse.
4) Connect each drop down to the Formula tool where you are performing your concatenation. One option is to connect via Action tools and change the specific string in the formula tool. Caution though: when connecting multiple interface tools to an ordinary tool, order matters. If your first Action tool replaces part of the formula expression with a value that the second Action tool is set to replace, you may not get the expected results. (you can see what I mean if you choose B, A, then C in the app I've attached (you may need to relink to the sample spreadsheet I used)).
To summarize, the File Browse changes the input tool to bring in the data from a file of your choosing. The drop downs update with a list of fields from that file. The drop down selections then change the formula tool to ensure concatenation occurs on the appropriate fields.
I have attached an app that should bring to life what I shared above. Hope this helps! Let me know if you have any questions!
Hi @mathias_schnoor! I tried it with another CSV and it works just fine. Opening your CSV in Excel, it looks to be mostly semi-colon delimited. You'll want to make sure your CSVs are truly comma delimited before using the app. Hope this helps!
Hi @mathias_schnoor! Glad I could help! It makes total sense why you would want to use another delimiter. Unfortunately, it is a limitation of the File Browse tool to not identify the appropriate delimiter or allow you to adjust the delimiter prior to the drop downs being populated like a normal Input tool can.
You could get around this issue by creating chained apps, but it'd be clunky. I've attached a zip containing a 2 chain app and related supporting files to show you what I mean. Here's a brief explanation of what the apps are doing.
The first app has 2 input tools, one configured as an Excel and the other as a CSV, each in their own tool container. Depending on the file type of the file you selected, the appropriate tool container will open and that Input tool will be changed by the File Browse. The input configured as a CSV has a drop down connected to it to adjust the delimiter. A Detour End tool accepts the data from whichever Input was activated and sends the data through to create 2 files: 1) A .yxdb of the selected file and 2) a list of fields from the selected file.
The 2nd app in the chain has the drop downs, which are populated from the 2nd output from the first app. Just like before, the drop downs edit the Formula expression, but this time the data feeding the formula tool comes from the 1st output of the first app.
There's quite a bit of configuration that went into this, so please post back with questions or private message me if you feel like a call would help you.
Hi Bolide, I'm having problem at step no. 4. Can you elaborate? I am using a "Select Tool" where 3 inputs from interface tools are connected. The Action Type has been selected as "Update select with multi-select ListBox". Have used 2 List Box and 1 Drop Down.
Problem I'm facing:
Input File has these fields: Field1,Field2,Field3,Field4,