I am building an Analytic App in Alteryx Designer where the user selects an Excel file that contains an “Account” column.
I would like the user to enter multiple account values (separated by “;”) via the Interface, and have the workflow filter the selected Excel data accordingly — without using any Join tools.
Sure - if you want them to type, Text Box Tool is your answer! I am not sure why you want to avoid a Join though - I would have the values update a Text Input, split to rows using a Text to Columns, and Join against the original data
I agree with @alexnajm that using a JOIN is ideal. If you're trying to avoid duplicate values coming in if the user adds one twice, then you can simply add Unique Tool or Summarize (Group By) Tool after the Text Input to force distinct records.
Also, for what it's worth, using Alex's approach also allows you to do some quality checking and cleansing steps on the user inputs so they don't have to be as prescriptive about format when they're entering values (ex. Trim(), Upper(), Lower(), Removing Symbols, etc. so that it matches your data source format).
@VascoA
Apparently, you have not got the chance to solve the weekly challenge of this week. 😁
First App of Weekly challenge #500 presents the same problem as yours here.
https://community.alteryx.com/t5/Weekly-Challenges/Challenge-500-New-Year-New-Ears/td-p/1427578
I have made a quick sample as below as well.
have
Hello @VascoA,
Like @alexnajm and @jrlindem I too would initially have approached this with a Join tool; however, if you don't want go down that route, you could use a filter tool and an In statement.
It would work as follows:
Here's my input data (this can obviously be changed for an input data tool which updates based on a user selection, however it sounds like you already have that part, please let me know if not).
1) Add a filter tool to the canvas, and write an In statement such as the following:
2) Set an action tool to overwrite the "1,2,3" with the text entered by a user, (if you want to use ";" as a delimiter instead of a "," you may need to update the filter based on a formula, which replaces all the ";" with ","):
3) The app then works as follows:
Input:
Output:
I do feel the need to mention that this is prone to potential issues, such as users mistyping the account codes, or putting a "." instead of a "," leading to a different output. The way to get around this would be to use a more controlled user interface element, such as the List box, as per @Qiu's solution, however, if you want to stick with the text box, I believe my solution should work as you expect.
I've attached the worklfow below incase you wanted to take a further look. Please let me know how you get on.
Regards - Pilsner