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

add variable in the query/string body to pull data

othmane
7 - Meteor

 

Hi;

i am new to Alteryx and appreciate your help about this challenge.

with IT help, i built this JSON query. see screnshot below in field " query string/body". That query contains variable to be called.

for example, variable6 is the username of the person running the workflow. I created a user interface where the user enter the username. how can i link the value from the user interface into to the query?

i appreciate your help. 

 post.JPG

 

 

 

 

 

 

 

 

3 REPLIES 3
shreyanshrathod
11 - Bolide

Hi @othmane ,

 

Step 1 : Assume, I have configured my Download tool as follows :

 

shreyanshrathod_0-1619422377940.png

I have entered "{identifier:variable1}" in Query string text box. You will replace it with your parameters.

 

Step 2 : Drag a Text box tool onto the canvas. Connect the 'Q' anchor of the Textbox tool to the Lightning bolt input of Download Tool. An Action tool will automatically connect in between the TextBox tool and the Download tool

 

shreyanshrathod_1-1619422580243.png

 

Step 3 : Configure the Action tool. Set it to 'Update value (Default)' mode.  Expand the 'Payload' attribute in the below update window and SELECT the "Text - value : " parameter. Whatever paramater you passed in Step 1 will appear here. In my example, it's "identifier:variable1".

 

shreyanshrathod_2-1619422788456.png

 

 

Step 4 : Finally, at the bottom of this window, you will find a checkbox stating "Replace a specific value".

Select that and only keep the text in the window that you want to replace with user input.

In my case, I want to replace "variable1" with user input.

Hence, only "variable1" is kept in the window.

 

shreyanshrathod_3-1619422932142.png

 

It should work.

Let me know in case of any queries.

 

Regards,

Shreyansh Rathod

 

othmane
7 - Meteor

HI Shreyansh 

it worked. thanks alot for your help.

 

shreyanshrathod
11 - Bolide

Hi @othmane ,

 

Good to hear that it worked.

 

Also, I have suggested an idea to be added to Alteryx designer's Result window. You can read about it here.

https://community.alteryx.com/t5/Alteryx-Designer-Ideas/Adding-IN-operator-functionality-in-Results-...

 

If you find it relevant, kindly give it a like as more likes help in visibility of the idea.

 

Cheers.

Labels
Top Solution Authors