Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Macro Interface Tools

CoreyS
8 - Asteroid

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).

 

alteryx_macro_interfacetools.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

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:

alteryx_macro-v1.PNG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Thanks for any help in advance!

 

Respectfully,

Corey

8 REPLIES 8
T_Willins
14 - Magnetar
14 - Magnetar

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.

CoreyS
8 - Asteroid

@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

danilang
19 - Altair
19 - Altair

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

CoreyS
8 - Asteroid

@danilang thanks for the tip!

CoreyS
8 - Asteroid

@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:

  • How do I give end-user the option to select "Male/Female" for Patient Gender in the List Box interface tool?
  • How do I give end-user the option to multi-select a state(s) in the List Box interface tool?
  • How do I give end-user the option to multi-select a geography in the List Box interface tool?

 

Macro/Workflow (preview):

alteryx_macro-v1+interfacetool.PNG

 

@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:

alteryx_listbox_config.PNG

Current - Action configuration:

alteryx_action_config.PNG

Macro Output results (no matter what I select in List Box fields):

alteryx_macro-v1.PNG

 

 

 

Thanks again for your continued support!

Respectfully,

Corey

CoreyS
8 - Asteroid

Good afternoon Gentlemen (@danilang @T_Willins) + @MarqueeCrew 

 

I made some adjustments but still no luck.

 

Challenges:

  • I'm trying give the end-user the ability to select "Male" and/or "Female" in the List Box instead of "Patient Sex" (original format = "M" or "F"), which actually gets converted to [Patient Gender] ("Male" or "Female") later on during Data Preparation in macro.
  • [Patient Age] (0-100), which gets converted into Generational groupings later on in macro.
  • Same concept is being attempted for the [Patient State] (original format = "FL") and gets converted to [Patient State] = "Florida", and further grouped into [Geography] = "Southeast". 

Desired List Box 'Questions':

  • Gender (i.e. list of Patient Sex groupings defined later in macro--"Male" and/or Female")
  • Generation (i.e. list of Patient Age groupings defined later in macro--"Millennials", "Boomers", etc.)
  • Geography (i.e. list of Patient State groupings defined later in macro--"West", "Mid-West", etc.)

Adjustments made:

  • Added Interface tools (List Box + Action) + Filter tool to beginning of my macro (should this go at the end...after my data prep?)

alteryx_questions_listbox_config.PNG

 

 

List Box + Action + Filter tool @ front of macro:

alteryx_listbox_config.PNGOther considerations:

  • Tree tool; to allow end-user to select a substring (e.g. Patient Sex: "M" or "F") but couldn't figure out how to make it happen.

Any feedback would be greatly appreciated. Thanks!

 

Respectfully,

Corey

danilang
19 - Altair
19 - Altair

Hi @CoreyS 

 

Here's an example of how to use a list box to update a filter using an IN operator.

danilang_0-1615901819956.png

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 

danilang_0-1615913740440.png

and have the action tool replace the string "M"(include the quotes)

danilang_1-1615913936823.png

Dan

CoreyS
8 - Asteroid

@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

Labels