Hello my fellow Alteryx Community Members,
I'm working on a 'Macro Interface Tools' project and need your help.
Basically, I'm trying to add 'Interface Tools' to my macro input but not sure if I'm taking the right approach.
My goal: Give the end-user the ability to...
1) Select a specific [Patient Sex]/[Gender] from the data source (required field),
2) Select either an [Age] or [Birthdate]; preferably [Birthdate] in the "YYYY-MM-DD" format (required field), and
3) Select a Geographic location in the form of [State] (required field).
Ultimately, the end-user must have these fields (in their Input dataset) to result in desired output of macro.
Example-1: If end-user only selects [Patient Sex]/[Gender] = M/Male, the macro output result will only show M/Male [Personas].
Example-2: If end-user only selects [Patient Sex]/[Gender] = F/Female and [Birthdate], the macro output result will only show F/Female [Personas] with specific [Birthdate] specified.
Example-3: If end-user selects both [Patient Sex]/[Gender] = M/Male and F/Female, and specific [Birthdate], with a selected Geographic location of a specific [State], the macro output result will only show the selected Personas with the selected [Birthdates] in the selected [State(s)] within associated dataset.
Current view of Macro Input/Workflow:
Thanks for any help in advance!
Respectfully,
Corey
Solved! Go to Solution.
Hi @CoreyS,
From the information below it looks like you are on the right track, but an initial comment. A Drop Down tool will only allow a single selection, so in your example 3 the user would not be able to select both Male and Female. A List Box tool allows for multi-selection. The best way to start it to review this link:
https://help.alteryx.com/current/designer/interface-tools.
This link describes the interface tools. The best way to think about adding interface tools to a macro is to think about how you would filter (hint) the data for each of the inputs. Add these tools to the macro workflow. The interface tools are then connected to the "filtering" tools in the macro. Let me know if you have further questions.
@T_Willins thanks for your feedback!
I'll continue exploring these options. I'm definitely curious to see how this approach applies when connecting to the "filtering" tools in the macro.
I'm sure I'll be back for more guidance. For now, your support is much appreciated!
Respectfully,
Corey
Hi @CoreyS
As a further hint here, when you're using a list box/filter combination is easiest if the filter can written using the "In" operator as in
[Patient Gender] in ("Male","Female")
The reason being that it's easy to get the list box to generate the criteria without having to use complex string manipulations in the action tool
Dan
@danilang thanks for the tip!
@T_Willins and @danilang
I attempted to add a list box/filter to my macro/workflow (at the end) but no matter what I select in the actual 'interface' options (i.e. Patient Gender, Patient State, Patient Geography, etc.), the same results are in the output when I run.
Challenges:
Macro/Workflow (preview):
@T_Willins - I reviewed the List Box Tool | Alteryx Help but didn't see where to customize filter results (i.e. for Patient Gender field...."Male/Female", etc.
@danilang - Not sure where to enter the customization formula in the List Box/filter as you suggested --> [Patient Gender] in ("Male", "Female").
Current - List Box configuration:
Current - Action configuration:
Macro Output results (no matter what I select in List Box fields):
Thanks again for your continued support!
Respectfully,
Corey
Good afternoon Gentlemen (@danilang @T_Willins) + @MarqueeCrew
I made some adjustments but still no luck.
Challenges:
Desired List Box 'Questions':
Adjustments made:
List Box + Action + Filter tool @ front of macro:
Other considerations:
Any feedback would be greatly appreciated. Thanks!
Respectfully,
Corey
Hi @CoreyS
Here's an example of how to use a list box to update a filter using an IN operator.
Check Generate Custom List and leave the default options. This will generate a comma delimited list the you can use in a filter tool using the IN syntax. For the gender list values set the List Values to manual and enter the two values that you have in your input.
Set up your filter like this
and have the action tool replace the string "M"(include the quotes)
Dan
@danilang thank you very much, sir!
I'll go back to my data-corner and see what I can do with your advice. I appreciate your feedback and support!
Respectfully,
Corey