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.

Create List out of Column values

Vikas038
8 - Asteroid

Hi Team,

 

 I am fetching data based on a sql code that has condition Segment in ('ABC','DEF','GHI'). So, with interface, I want to have all values of segment column in the form of List. So that I can simply select multiple values from that list and will receive data only for those selected(multiple) segments on executing WF

 

Since my table(on which I ran query) contains large set of data so I want to apply that filter of segment on the sql code itself. Purpose is, that way performance will faster and we will be able to exclude unwanted data at the very starting of the WF. 

 

It will be great if you share sample WF for the same.

7 REPLIES 7
Robin_McIntosh
11 - Bolide

Try this.  You'll obvisouly need to update the database connections (i.e. YourDSN, YourSchema, YourTable, etc.)

 

Robin_McIntosh_0-1656085419959.png

 

Vikas038
8 - Asteroid

Hi Robin,

 

I tried given WF and updated database connections but list is not populating any of the unique values available in mentioned column. So list is coming up blank. I tried couple of changes  like enabling browse via interface designer but still list is coming blank. Can you suggest on this?

grazitti_sapna
17 - Castor

@Vikas038, after you changed the data source kindly run the Alteryx workflow once before running it as an app. After you run the workflow then try running it as an app.

 

If this does not work for you then you can save the unique values first as a yxdb file in NAME:VALUE format which you can use in the list box and then run the app. This will require you to run the first workflow once which will save the yxdb file then you can directly run the app.

Workflow 1

 

grazitti_sapna_0-1656404325159.png

 

App Workflow

 

grazitti_sapna_1-1656404357785.png

 

Output

 

grazitti_sapna_2-1656404411121.png

 

 

I hope this helps!

 

Thanks!

Sapna Gupta
Robin_McIntosh
11 - Bolide

@Vikas038 is it possible for you to upload your WF?  Are you querying against SQL Server, DB2, etc?

Vikas038
8 - Asteroid

Hi Robin,

 

It wont be feasible to upload my WF. Although, I am using Oracle to query my data and using your by just changing database connections

Robin_McIntosh
11 - Bolide

@Vikas038 There are some differences in SQL between DB2 and Oracle.  For instance, DB2's CURRENT DATE translates to Oracle's SYSDATE.  You will need to make sure the entire SQL is translated.

Vikas038
8 - Asteroid

Hi Sapna,

 

Suggested solution is pretty much functional. And now all values are showing up under list box that I can select as per my requirement.

 

Although, when I select multiple values then output is not being written on excel file that has been mentioned in output tool. In excel file, only column names are being written.

 

What I tried so far is:-

* From interface designer, checked browse and output tool

* adjusted setting in list box like under generate custom list only kept separator as comma only

 

Labels