Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

built Variable to feed Download

othmane
7 - Meteor

Hi All,

I have posted the issue before but the answer i realized that I need to add more details so you can have an idea of the issue.

I setup a user interface where a user must enter 1 variable which feed a JSON query. see below the workflow.

 

Capture.PNG

 

See below the query setup within the download object

Capture2.PNG

 

The query has been buit in a way that in the user interface, when token value is entered: it s updated in the Query string "Variable-Token". in the flow, I derived another variable based on a set of data and the output is in a formula object. that formula contains the variable which should feed the query and update value in "Variable-username". for several hours, i tried to connect the formula into the download so my value can be updated but i was not successful. hope someone can help me. thanks

11 REPLIES 11
JustinBabbitt
Alteryx
Alteryx

@othmane 

Hello. 

 

It seems like your connection string could be stored in a new field using the Formula Tool ahead of the download tool. The UI/Action Card could update the "Variable-Username" text in the Formula tool to let it become dynamic. Then you would choose the "Take query String/Body from Field" and select the field that is storing the dynamic connection string. 

 

See the stubbed-out image. 

 

Justin

Justin Babbitt
apathetichell
18 - Pollux

If what @JustinBabbitt recommend doesn't work - could you post a screen grab of the settings of your action tool? There could be a small error there throwing it off.

othmane
7 - Meteor

Hi Justin,

i did try this idea by adding the value string in the download object then i dont know how to link the variable name in the query and replace it by the variable identifier in the string.

would you have an example.

thanks

othmane
7 - Meteor

Hi

I am not sure i understand what you mean bz setting of the action tool. do you mean the formula tool?

thanks

apathetichell
18 - Pollux

Hi! If you can post a screen grab of your action tool configuration that would be great.

 

The option that @JustinBabbitt  and I are talking about is in the update value section of the action tool. You have to click on Download then Payload in the update value section of the action tool.

 

Then see where it says "QueryStringBodyMode-value=..." that should be your full query. highlight that and click below on "replace specific string" that box is where you put the exact part of the Query you are looking to replace ie "variable.username" or whatever it's called.

 

the second option is to set up a specific field with your query beforehand - and change your payload option from "use following for query string/body" to "take query string/body from field" and put in the field name there.

JustinBabbitt
Alteryx
Alteryx

Sure - 

 

check out the attached yxwz example. 

 

I set it up so the Token is coming in from the Text Input and the UserName update is coming from the UI Text box tool. 

 

The Text Box is used to update the Field in the formula tool called vUserName. 

 

vUserName & vUserToken are used in a second Field which contains a dummy Connection string. 

 

The dummy connection string is then passed into the Download tool. Let me know if this helps. 

 

 

Justin Babbitt
othmane
7 - Meteor

Hi Justin

I am not able to open the attachment. It looks like you are using a recent version and i can not open the flow. i have 2020.1.2.24185

is it possible to save the file in a previous version or would a screen grab be easier?

thanks again

JustinBabbitt
Alteryx
Alteryx

Try this one. 

Justin Babbitt
apathetichell
18 - Pollux

@JustinBabbitt's workflow is solid - but there are two minor fixes. You have to click the box next to replace a specific string in the update section of the action tool. Also the text should not be in quotes. IE - it should just say USERNAME not "USERNAME"

Labels