Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Configuration for enabling and disabling containers from interface condition

SJohnson257
8 - Asteroid

Having the most difficult time understanding what the configuration for a set of interface tools that will, if the condition is selected enable a container to filter the data stream and if it is not selected will enable a container that allows for the full data to flow through.

 

Formulas used for the condition have been:

 - [#1]

 - ToNumber([#1]) = 1

 - IF [#1] THEN 'False' ELSE 'True' ENDIF

 

With both switching the action tools between Enabled and Disabled and swapping out the connection between both containers.

 

I am at a loss. 

 

SJohnson257_0-1648126070761.png

 

 

 

21 REPLIES 21
SJohnson257
8 - Asteroid

Hi @ChrisTX,

Currently, I am using dropdowns, and condition interface tools. Would you give me an example of the other interface tools to use?

ChrisTX
15 - Aurora

I'm guessing you've already seen the Example linked under each tool in Designer?

 

The tool mastery articles are helpful: https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-Index/ta-p/84593

 

Have you seen these interactive lessons:

Creating Drop Downs
Using List Boxes
Implementing Conditional Routing
Chaining Analytic Apps

 

Community > Learn > Academy > Interactive Lessons

 

https://community.alteryx.com/t5/Interactive-Lessons/tkb-p/interactive-lessons/label-name/Creating%2...

 

SJohnson257
8 - Asteroid

@ChrisTX oh definitely I have pursued ALL of them =) (the interactive lessons, but not all of the tool mastery)

 

SJohnson257_0-1648131114381.png

 

ChrisTX
15 - Aurora

Are you able to post a sample workflow, and the next step you're trying to accomplish?

 

SJohnson257
8 - Asteroid

HI @ChrisTX,

 

Thank you and yes I will

SJohnson257
8 - Asteroid

@ChrisTX 

Attached is the example.

 

What I am trying to achieve is give the user 2 optional filters to the data; Plant and Owner.

 

If the user enters a plant code then the container to filter plants is enabled and the container to allow all plants is disabled.

If the user selects an owner then the container to filter owners is enabled and the container to allow all owners is disabled.

 

The difficulty I ran into was the toggling seemed to switch from run to run, where when I had the T/F streams going to either enable or disable the allow all containers.

ChrisTX
15 - Aurora

There's an easier way, avoiding the use of Container enabled/disabled, by using the Action Type "Update Value with Formula".

I'll list that option later.

 

But first here are the changes I made to your current workflow:

 

1) In your Input file Book1.xlsx, I added a value for Name = *All and Value = 1
If you're using a drop-down and you want it to be optional, you'll need to provide a value for All. I chose the Value 1 because 1 is used in the Condition(51) tool.

 

2) In the container for "Filter Plant - Interface"
In tool Condition (41) I changed the Expression to IsEmpty([#1]) and reversed the T and F output anchors (changed which Container they point to)

 

3) In the container for "Filter Plants"
I changed the the Filter tool to use the T output anchor (not F)

 

4) In the container for "Users and Owners Interface"
I reversed the T and F output anchors (changed which Container they point to)

 

5) For all action tools, I changed the "Update container to be" = Disabled.

Your containers are all starting out as Enabled. If you are testing your App and a test run sets a container to Disabled, that container will revert back to a starting status of Enabled the next time you run the App.

 

How to test your App:

 

Open Interface Designer (View > Interface Designer)
Click the magic wand icon on the left
Enter your parameter values, just like you would when you run the App
Click the button for Open Debug
Alteryx will open a new workflow tab like "Debug Workflow12", with your containers enabled/disabled based on your parameter values, and the values in your Filter(s) changed based on the Condition tools.

Then just click run and view the results.

 

If your flow results are not right, close the Debug tab, fix your workflow, and try again with the Interface Designer magic wand and Open Debug button.

 

See attached App "Example Filtered Interface - Option 1 with Containers.yxwz"

 

Just add the Name *All and Value 1 to your Excel input file and test the App with the magic wand and Open Debug.

 

=====

 

Now... how to use the Action Type "Update Value with Formula" and avoid Container enabled/disabled:

 

I used the little trick "1=1" in a formula, which will always evaluate to True.

 

The 1=1 represents a selection of "all" for Plant (when the user leaves Plant blank)
and represents a selection of "all" for Owner (when the user selects *All in the owner drop-down)

 

See attached App "Example Filtered Interface - Option 2 Action with Formula.yxwz"

 

=====

 

For your Plant Code question text, you may want to use
  Enter Plant Code or leave blank for all Plants

 

For your Owner question text, you may want to use
  Select Owner or select *All for all Owners


Chris

SJohnson257
8 - Asteroid

@ChrisTX Thank you!!

 

"Your containers are all starting out as Enabled. If you are testing your App and a test run sets a container to Disabled, that container will revert back to a starting status of Enabled the next time you run the App." Boy, this alone is so helpful to understand!

 

I will work through your suggestions and share what I learned!

SJohnson257
8 - Asteroid

@ChrisTX my sanity is restored!!!

 

Thank you, thank you, THANK YOU!!

 

I will post a sample of my WORKING filters =)

SJohnson257
8 - Asteroid

Hi @ChrisTX,

 

Again, thank you for your help and your time! Below are before and after screenshots from your advice. I kept the containers with Plants and Owners, but used the Update Value by Formula method for the remaining.

 

It works beautifully!!

SJohnson257_1-1648279498602.png

 

SJohnson257_2-1648279552214.png

 

Labels