Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I use this macro to get the information I need in a variable. It works prefectly. But now, I want to make a loop into script to get the response into a field . How can I achieve this ?
function httpGet
Set val=ActiveDocument.Fields("Url").GetPossibleValues
sStockID = val.Item(0).Text
vURL = sStockID
'Create xmlhttp opject
Set xmlhttp = CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "GET", vURL, false
xmlhttp.setRequestHeader "Content-Type", "text/xml"
xmlhttp.send ""
result = xmlhttp.responseText
result = replace(result, ">", ">")
result = replace(result, "<", "<")
set txt = ActiveDocument.Variables("vXMLReceived")
txt.setContent result, true
end function
Thks for your help.
What you could do in the load script as a replacement for your VBScript you have is:
LOAD
result
FROM [ http : // someurl ? abc=123 & def=456 ] (XmlSimple, Table is [string]);
Is that QlikView is in fact doing an HTTP GET. And what you specify as (XmlSimple .... )
is that the return will be an XML-file. You could do similar Replace() functions in your load script to pull out the data you want.
The interactivity will not be directly possible - but what you could do is write the values to a server-side text-file or Excel-file and read that in before the load from HTTP and make variables that you will use as $-expansion in the final load.
What you could do in the load script as a replacement for your VBScript you have is:
LOAD
result
FROM [ http : // someurl ? abc=123 & def=456 ] (XmlSimple, Table is [string]);
Is that QlikView is in fact doing an HTTP GET. And what you specify as (XmlSimple .... )
is that the return will be an XML-file. You could do similar Replace() functions in your load script to pull out the data you want.
The interactivity will not be directly possible - but what you could do is write the values to a server-side text-file or Excel-file and read that in before the load from HTTP and make variables that you will use as $-expansion in the final load.
have you checked wget? i use it and it works very well
Thank you but I decided to use the load from web file in a loop.
Here is what I did : https://community.qlik.com/docs/DOC-8955#comment-35868