Happy 8th birthday to the Maveryx Community! Take a walk down memory lane in our birthday blog, and don't miss out on the awesome birthday present that all Maveryx Community members get to take advantage of!
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:
- 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.
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
Example Filtered Interface - Option 1 with Containers.yxwz
Example Filtered Interface - Option 2 Action with Formula.yxwz
"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!
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.