Alteryx Designer Desktop Discussions

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

App Errors: Use of Check Box to Disable Containers

sevans
7 - Meteor

Hi All,

 

I'm building an app and when running the workflow, I keep getting the same errors appearing. I've attached a simplified version of the workflow I'm building and essentially the user is submitting details on flights, could be one flight or many but if only one flight, then #2 and #3 containers need to be disabled.. I can't see to get this to work. 

 

The result I want to achieve is: 

- Flight 1: Information Submitted

- Flight 2: Check box unticked to disable container and skip

- Flight : Check box unticked to disable container and skip

Output to only contain data inputted from Flight 1

 

Could someone help me out to know what I'm doing wrong? 

 

Many thanks, Stuart

4 REPLIES 4
AngelosPachis
16 - Nebula

Hi @sevans ,

 

I am not sure how to solve this but I know what the problem is. The issue lies on how radial buttons/checkboxes actually work, which is counterintuitive to what most people anticipate. When a checkbox/radial button is selected, that deactivates the container. So for a container to be activated, the checkbox should be left unchecked.

 

You can see that in the configuration window of the action tools connected with the containers

 

Screenshot 2020-12-02 193352.jpg

 

Also, disabled containers cannot contain interface tool and that's an error you might have seen already.

AngelosPachis
16 - Nebula

Hi @sevans ,

 

I managed to solve this one I think and I learned many things I didn't know along the way so thank you for raising this in the community. 

 

What I did is first of all get your interface tools outside of the containers because that would surely return an error at some point. Then, because I wanted a part of a workflow to be executed/not executed depending on the checkboxes selections, I split out your three flight via using two filter tools. Now you would have a single record for each one of your Flights.

 

Then, to edit the details of each record, I used a formula tool and reconnected all the drop-down/text boxes to the formula tool to update the values of every field.

 

After that, I found this very useful post in the community: 

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/How-to-reverse-the-logic-of-the-check-...

 

That essentially means that you can reverse how checkboxes/radial buttons work by default, by using this statement in the respective action tools that are used to deactivate containers:

 

if [#1] THEN "False" else "True" endif

 

That means that if a checkbox is checked (hence #1) then assign the value "False" to the checkbox, else assign the value "True". To understand which one is which, I activated and deactivated a container and looked in the action tool.

 

When a container is active, then the action tool shows something like this:

 

Screenshot 2020-12-02 203559.jpg

 

So active="False".

 

If a container is disabled, then the same action tool shows this:

 

Screenshot 2020-12-02 203716.jpg

 

So disabled="True".

 

Thus, the statement used above would activate the container when the check box is checked and vice versa, so I managed to reverse the default checkbox setting.

 

Finally, I had to work on the error messages. That's because even if a container was disabled, the error message would still return an error since the user would not have typed a string with a length>3. To solve that, I connected the checkboxes to the error messages and I demanded that an error message to be returned when the length<3 and when the checkbox="true"

 

Let me know if that works for you or you have any further questions we can look at.

 

Kind Regards,

 

Angelos

sevans
7 - Meteor

Thank you very much @AngelosPachis You have saved me so much time trying to figure this one out! The way you have solved this is brilliant and the instructions to go along with it is very helpful and clear the understand. This will be very helpful as I've see so many people being confused by the logic that the Check Box uses. 

 

Thank you once again! 

CainãClímaco
9 - Comet

Thank you @AngelosPachis . This formula "if [#1] THEN "False" else "True" endif" helped me a lot.

Labels