Hello -
Wrangling with this very straightforward issue for a few hours now. I have a simple analytics app that queries a sql database and then prompts then presents the user with three options to select from the database: by Account, by Last Name and by Email address. I do this via checkboxes and the DETOUR tool. The app works okay but strangely enough when I click on the Filter that occurs AFTER the detour tool (there are 3 of them for each checkbox) the field list that looked perfectly healthy before the Detour, disappears. When I click on the Filter plugged in after the Detour tool it is empty. What's even weirder is that I can enter a custom query and type in a field name that is flagged in red as an error (because it does not exist)...but the app works! It's as if the reference is resolved at run time. As weird as this is, I would be okay with it but I can't do anything with the data after the Detour (like format a PDF or Table) because no fields pop up in those tools. Is this a known Alteryx bug?
Notice in the illustration, that the first select is okay. It is displaying the full select list of input columns. All the others are empty or the only column, strangely enough, is “ACCOUNT”, but flagged as missing.
I have tired to attach the app but getting error "The attachment's detourapp.yxwz content type (application/octet-stream) does not match its file extension and has been removed." Any recs on that?
Thank you kindly,
Art Casale
Solved! Go to Solution.
Ok, I've got a suggested workflow here, and it's definitely a detour from the Detour tools.
Let's start with the user interface. Since only one field can be selected at a time, this could be accomplished by either a set of Radio Buttons, or a Dropdown. I decided to use a Dropdown for two reasons
1) It allows the field list to be dynamic (instead of setting a Radio Button for each). This list can be updated dynamically to list all fields connected to the input of the Dropdown tool.
2) it means we only need one "Search Value" field, which makes updating the filter much easier.
Detours... because the filter tool can have both the field and value searched changed, one filter tools can perform all the filtering/detouring we need. There are two Action tools attached to the Filter tool: one to update the field that is searched, and another to update the value that is searched in that field.
Next, since it looks like your were performing the same formatting on the field values each time: instead of using the same set of tools copied for each detour, let's just have one set of tools so any changes to this process only has to be done once.
Finally, I added a section after your formatting to make sure there's an output for the user to see when there are no search results. This may not be necessary in your case, but it's a part of the user experience to consider when building applications.
Take a look at the attached App and let me know what you think.
Wow, look at the similarities in the solutions that @danilang and I independently provided. Nice work!
Brilliant! Thanks so much Charlie for investing the time in this. I literally spent the entire day today trying to get all the detours to play together. I finally ended up substituting a dynamic query and almost got to home plate but still had issues getting the select tool to work after the dynamic query. Anyway, this is a lifesaver. Thanks again. Art
Thanks so much danilang! I replied earlier that this was a perfect solution. I have one follow up question. Is it possible to output the selection actually made by the user (e.g., account, lastname, email or loginid) and pass it down the workflow? I may need to query what they selected and branch the final output files based on that.
Hi @artzee1556
I made a change adding a formula tool that creates a new field called [Selection] and linked that to the Drop Down. Now the value of [Selection] is the Field name you selected in the UI and is available further downstream.
BTW. It is possible to mark more than one answer as a solution. @CharlieS'
Dan