Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

User input to change value in SQL code

SteveFord
7 - Meteor

Hey, I'm bringing in data using the sql below. I want my user to be able to change the Where clause value in a simple way (The page id), any idea's?

 

select iris_raw_zone.informa_connect_unbounce_global.leads.leads_id,
iris_raw_zone.informa_connect_unbounce_global.leads.page_id,
iris_raw_zone.informa_connect_unbounce_global.leads.form_data,
iris_raw_zone.informa_connect_unbounce_global.leads.created_at
from iris_raw_zone.informa_connect_unbounce_global.leads
WHERE iris_raw_zone.informa_connect_unbounce_global.leads.page_id = '8d995059-fa68-46d2-8244-087fed639d88'

1 REPLY 1
peterr_h
8 - Asteroid

Hi!

 

This one is pretty simple.

 

Firstly, use an Input Data tool to pull in the data from the DB using the above query.

 

Then attach a Text Box (interface) tool to the Input Data tool.

 

Then, in the associated Action Tool, select the box that says 'change specific string' (or something along those lines). It is likely that this won't contain the full query as it'll be slightly truncated but that's not an issue - simply put, in this box, the ID that you are currently using (8d995059-fa68-46d2-8244-087fed639d88). This should work for you :)

 

Let me know if it doesn't, 

Peter

Labels
Top Solution Authors