Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is it possible to use a variable in a REST connection?

Good Afternoon All,

i am new to all this and this is my first question so please bare with me

I am using a REST connector to connect qlik view to my SmartSurvey account to retrieve the surveys that have been conducted via the use of API.

I initially collect list of all the surveys that have been completed with uniqueIDs. Using the uniqueID i will be able to collect the responses to each survey,  As am sure you can tell the uniqueID is generated every time so for this reason i am using a peek statement to assign the latest survey uniqueID to a variable which i would like to use in the REST connection so that it will load that into my qlikview.

i have used WITH Connection, but this doesnt work as well as mulitiple attempt of using it within the REST connection script.

-------------------------------

Current Script:

url = https://api.smartsurvey.io/v1/surveys/335393/exports;

vURLDownload:  https://api.smartsurvey.io/v1/surveys/335393/exports/519048/download

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;

url=https://api.smartsurvey.io/v1/surveys/335393/exports;

timeout=30;

method=GET;........

i want to do the following:

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;

url=$(vURLDownload);

timeout=30;

method=GET;........

-------------------------------

I am sorry i cant give the other script information as it includes the API keys etc however if there is any other information just let me know and i will attempt to provide.

I am stuck now and open to ideas.

Thank you Very much

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I played around, the following script has worked for me.

Capture.JPG

View solution in original post

4 Replies
sasiparupudi1
Master III
Master III

Should work..try the variable in quotes

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;

url='$(vURLDownload)';

timeout=30;

method=GET;........

Anonymous
Not applicable
Author

HI,

Thank you for your suggestion but i have already tried this and i get the following error message.

Capture.JPG

sasiparupudi1
Master III
Master III

May be try like this

CUSTOM CONNECT TO "Provider=QvRestConnector.exe;url="& "$(vURLDownload)" & ";

timeout=30;

method=GET;........"

Anonymous
Not applicable
Author

I played around, the following script has worked for me.

Capture.JPG