Alteryx Designer Desktop Discussions

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

List Box - Error Message with more than X number of selections

Hi!

 

We are using a cross tab tool to bring in dynamic values and provide to the end user in a List Box. We want to provide the user with feedback and end the workflow flow if they've chosen more than X number of selections. I was testing with a limit of 2 on the dummy data below. We either have the error message always show up regardless or never show up. Does anyone have any insight?

6 REPLIES 6
Prometheus
12 - Quasar

You have a List Box tool to change the value in the Filter tool, but the Filter tool only has one value in it, so when you select more than one value in the List Box, it tries to pass that to the filter. You also have the Action tool replacing the entire formula expression. But even if you change the value in the Action tool to just Alpha 1, it'll still throw the error because it's trying to replace Alpha 1 with more than one value.

My understanding is that the Error Message Tool will only work when connected to another Interface Tool.

Prometheus
12 - Quasar

I read your post wrong to begin with. Add an exclamation point before your expression in the Error tool -- !REGEX_CountMatches([#1],"|")>2 -- and it'll pass when you select only one thing from the List Box.

jrgo
14 - Magnetar

@MichelleMitchellLutz 

 

Your regex expression is not written correctly. The pipe character is used by regex so you need to add a backslash to indicate you want to match on a literal "|". Below is how it should be written.

 

REGEX_CountMatches([#1],"\|")>2 

 

That said, the setup for how your list box tool is getting values may not work in the way you're expecting it to when it's ran as an app. the list box will always show the values based off the metadata it was saved with.

 

If you want the values in a list box to change based an input, you'll need to go with the chained app route.

Felipe_Ribeir0
16 - Nebula

Hi @MichelleMitchellLutz 

 

I made some changes, now it seems to be working as you need. Here is a testing with error if > 3:

 

analytic_app3.gif

This is perfect! Thank you so much, works like a charm. :)

Labels