We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Dynamic Input - Create new Where clause if file exists

AW25
7 - Meteor

Hello!

 

So I have an Analytic App that I'm publishing on our Gallery for users to pull Accounting data. We originate loans so our accounting system keeps records at a loan-level and our accountants often look at the information at loan-level as well. The workflow right now allows users to enter a list of GL accounts and the output returns a grid with loan numbers on the far left column and then a column for each GL chosen and it's balances. Here's a screenshot:

 

sample_picture.png

 

Because this list can get very long for certain GL's (as in, way too big for a spreadsheet), I want to allow users to upload a list of Loan Numbers and filter the workflow for them. The most efficient way of doing it would be by adding a WHERE clause to the SQL query in the Dynamic Input and having it update, but sometimes users don't want to see balances for a selected list -- they want to see everything. Is there a way to add a WHERE clause to the query only if a file is selected? Another possibility is filtering the data with the list of loans -- like doing a join after the data is retrieved -- but again, I would only want it to join if there was a file selected. Any ideas on how I can go about this? Sample workflow and loan-list attached.

 

Thank you!!

1 REPLY 1
DavidP
17 - Castor
17 - Castor

I'm sure this can be done with radio buttons and condition tools, i.e. Option 1 (radio 1) loads all the data and Option 2 (radio 2) loads a values from a file and updates the SQL statement with Where IN (comma separated file data).

 

An excellent example of using radio buttons and condition tools was posted by @Claje in this post. I'm sure you can apply this for your purposes.

 

https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Run-set-of-code-based-on-checkbox/td-p...

 

 

Labels
Top Solution Authors