Alteryx Designer Desktop Discussions

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

Error Message - Configuration for Analytic App with dynamic sql query build

catherine_desesa
6 - Meteoroid

In this app, interface tools are used to dynamically construct a sql query (via a series of partial string replacements), and if the end user falis to make a selection from any of the listboxes, portions of generated query will effectively be selecting values in an empty set, (e.g. field_value  IN (' ').  How can we get the error message tool to recognize that a certain string replacement value is not acceptable and so display the specified error message?

8 REPLIES 8
chris_love
12 - Quasar
Hey Catherine

Have you tried conditions in the interface tools?

Using the little diamond on the tools to link them together you can specify what happens in certain circumstances e.g. when an app is left blank.
catherine_desesa
6 - Meteoroid

Yes, thank you.  It seems the problem is getting any expression box to recognize an expression containing quotes.  The error condition should be triggered when the partial string replacement value is: "education" IN ( ' ').  Seems the double quotes might be the problem - yes?

chris_love
12 - Quasar
Its hard without seeing the app (is it possible to share?) but yes it could be because you are mixing quotes in the same string which itself needs quotes.

However using a condition you should be able to check if the values coming out the list box are blank, ie. before it gets into the action to do the partial string replace. Ideally thats how I'd attempt solve it (assuming I am grasping the problem correctly - which I may not)

catherine_desesa
6 - Meteoroid

I'll see if I can post the workflow, or at least this portion of the workflow.  Check in tomorrow...

chris_love
12 - Quasar
Okay sounds good. In the morning I may post an example of what I am thinking too.
chris_love
12 - Quasar

Here's what I was thinking, you are right the double quotes do cause a problem (the default from the list box when generating a list is just to leave them) so I had to use an error condition of 

 

[#1] = '""'

 

i.e. single quotes wrapped around two double quotes.

 

Here's a quick picture of a test module.

 

2015-09-16_08-34-13.jpg

 

The condition is optional but tidies up the module.

brad_j_crep
8 - Asteroid

Is there a way of doing something similar to above but the file location selected in the listbox points to a folder that for some reason is empty?  I want to have a pop up in the app that says "the app data file doesn't exist please rerun with another selection."  Is it possible?

 

Thanks,

Brad

mszpot89
9 - Comet

@brad_j_crep - try using Error Message tool from interface with RegEx function to alert use when entering blank.

Labels