Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Error Message Configuration when Connected to a List Box

fimler
8 - Asteroid

I have a List Box that I need the end user to select atleast one value from and if they dont I want to present an error message.  I have tried to configure the expression in the Error Message tool any number of ways

  1. IsNull([#1])
  2. IsEmpty([#1])
  3. Length([#1]) = 0

Nothing I have tried has worked.  What expression should I use to stop the workflow if the user does not make a selection from the List Box.  The List Box contains the names of various organizations (alpha characters)

 

fimler_0-1622833420808.png

 

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @fimler 

 

I gave it some tries no luck from my end either😅. Want to see how someone solves it 🙂

AkimasaKajitani
17 - Castor
17 - Castor

 

I configured the List Box setting as following.

 - Use "Generate Custom List"

 

AkimasaKajitani_0-1622877142487.png

 

So I configured the Error Message tool as following.

AkimasaKajitani_1-1622877251079.png

 

The important point is expression.

 

IF [#1]='""' THEN "True" ELSE "False" ENDIF

 

 

If the previous setting, the List Box that is not checked return the double quotation.

 

 

If you don't check them

 

AkimasaKajitani_2-1622877264622.png

 

Error message will occur.

 

AkimasaKajitani_3-1622877300927.png

 

Please refer the attached workflow.

atcodedog05
22 - Nova
22 - Nova

Awesome @AkimasaKajitani 😎

 

So it was 🙂 which was needed to use. That was a bit cryptic one 😅

[#1]='""'

 

Thank you again @AkimasaKajitani for showing us how to solve it 🙂

 

AkimasaKajitani
17 - Castor
17 - Castor

Hi @atcodedog05 

 

Yes, that's exactly right.

 

I'm glad I could be of help.

fimler
8 - Asteroid

@AkimasaKajitani @Thank you!!!!!!  When I was trying to get it to work I had connected a Text Input tool to the list box with an Action tool in between so that I could see what was coming out of the list box when I had selected nothing and saw the “”.  So I then configured the error message tool expression as [#1] =“” but it obviously didn’t work.  I was so close!!!!   I’m going to write myself a reminder nite - “when all else fails, put it in quotes”.   Thank you again for your support. 

djaipras
7 - Meteor

For more context, this depends on the values in the XML tags <Multiple_Start> and <Multiple_End> (i.e., Stat Text and End Text in the configuration window, respectively).

 

Example:

<Multiple_Start>"</Multiple_Start>

<Multiple_End>"</Multiple_End>

 

Meaning empty List Box Selection depends on what you set for the Start Text and End Text and this is case for Dynamic List Box based on Macro Input or Custom Generated List.

 

So you don't have to Manually create a list of values for the list box to do this feature and it wont always be two double quotes if you set Start Text and End Text to something other than double quotes.

Labels