Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Using the list box tool for multi-select on Alteryx App

cwoo
8 - Asteroid

Hi

 

I have an alteryx app that I published on the company gallery. One of the parameters I am using is selecting two time periods. In the past, I allowed users to select only one quarter, which gets tagged as [PQ] and another quarter, which gets tagged as [CQ]. Then these [PQ] and [CQ] fields are used in many formula tools later in the workflow.

Alteryx 1.JPG

Alteryx 2.JPG

The users of the app now want to be able to select multiple quarters instead of just one quarter for [PQ] and [CQ]. So I have the below formula for the Formula tool, but there is no output. [PQ] and [CQ] inputs are "-1", which doesn't make sense. 

 

Alteryx 3.JPGAlteryx 4.JPG

 

Is there a way to easily resolve this issue?

 

Thanks

4 REPLIES 4
CharlieS
17 - Castor
17 - Castor

What's happening is that you're asking if [Achievement Quarter] is one of those values and the "-1" is basically saying "no". I think you'll want to rewrite this as an IF statement to return the value of [Achievement Quarter]. Try something like this:

 

IF [Achievement Quarter] in ("20151","20152","20153") THEN [Achievement Quarter]

ELSE null() ENDIF

 

This formula for CQ will return the value of the [Achievement Quarter] if it's in the specified list and be null otherwise. 

cwoo
8 - Asteroid

Hi @CharlieS

 

Thank you for your response. If I use your approach (List Box Tool, Formula tool with your formula), then it looks like all the quarters get selected, regardless of the quarters I choose on the app input popup page. And I don't know if it is related, but some of the calculations later on in the app don't work. 

 

Would you know why that would be the case?

 

Thanks

 

Alteryx 7.JPGAlteryx 6.JPG

Alteryx 5.JPG

CharlieS
17 - Castor
17 - Castor

I can't be sure why a calculation isn't working unless I see the calculation. Can your share your workflow+sample data? 

cwoo
8 - Asteroid

Hi @CharlieS

 

The workflow works now. Thank you for your help!

 

 

Labels