Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

Reload Application from Accesspoint in QV 11 verson using Macro

Hi,

Guru's,

is there any Macro to Reload Qlikview Application from Access point.

i heard this option is enabled in QV version 11.

any help would be greatly appreciated.

Thanks

6 Replies
Highlighted
Specialist
Specialist

Re: Reload Application from Accesspoint in QV 11 verson using Macro

Hi Babu,

See this thread.. You have to write VB Script to enable this feature.

Trigger EDX Qlikview 10

Sreeni

Highlighted
Creator
Creator

Re: Reload Application from Accesspoint in QV 11 verson using Macro

hi,

Thanks for Directing me to correct direction

can i give EDX trigger option to Multiple Users?

Thanks in advance

Highlighted
Champion
Champion

Re: Reload Application from Accesspoint in QV 11 verson using Macro

Highlighted

Re: Reload Application from Accesspoint in QV 11 verson using Macro

Yes, even to users without a license, to programs like Database Systems, to third party schedulers and to perpetrators if you're not careful. EDX is a great technique for triggering tasks from anywhere you like, but please make sure that security is tight.

Highlighted
Creator
Creator

Re: Reload Application from Accesspoint in QV 11 verson using Macro

Hi peter iam using Button with Action and Macro to reload from Acceespoint.

Sub CargoEDX()

url = "http://SERVIDOR _QLIKVIEW:4720/qtxs.asmx" 'QV Server Address and URL EDX's service

userID = "LOGIN" 'User login in target system. It must belongs to "QlikView Administrators"

pass = "PASSWORD" 'User Password

doc = "Aplicaciones/Monitoreo Servidor/WebServerPerformance.qvw" 'Task name that it wants execute

MsgBox "The reload starts. Please press "Accept" and wait for a minute"

MsgBox ReloadEDX(url, doc, userID, pass) 'Call to the EDX execution

End Sub

Function ReloadEDX(dsURL, document, userID, pass)

  ' Here get a ticket to call the EDX. It's because a security scheme based in double request

  Dim requestKey, xmlhttp, requestData, httpResult

  Set xmlhttp = CreateObject("msxml2.xmlhttp.3.0")

  xmlhttp.Open "post", dsURL, False, userID, pass

  requestData = "<Global method=""GetTimeLimitedRequestKey"" />" '& vbCrLf

  xmlhttp.send requestData

  Set oDOM = CreateObject("MSXML2.DOMDocument.3.0")

  oDOM.LoadXML xmlhttp.responseText

  ' Takes ticket hash from the response

  requestKey = oDOM.SelectSingleNode("//GetTimeLimitedRequestKeyResult").Text

  ' Call task (EDX) for execute

  rtaExec = CallTask(requestKey, document, dsURL, userID, pass)

  If rtaExec = Null Then

  ReloadEDX = httpResult

  Else

  If rtaExec = "Success" Then

  ReloadEDX = "The reload has finished."

  Else

  ReloadEDX = httpResult

  End If

  End If

End Function

'EDX call thru a HTTP POST

Function CallTask(key,task,url, usr, pasw)

  Set xmlhttp2 = CreateObject("msxml2.xmlhttp.3.0")

  requestData = "<Global method=""RequestEDX"" key=""" & key& """><i_TaskIDOrTaskName>" & task& "</i_TaskIDOrTaskName><i_Password /><i_VariableName /><i_VariableValueList /></Global>" & vbCrLf

  xmlhttp2.Open "post", url, False, usr, pasw

  xmlhttp2.send requestData ' Send XML with service qtxs.asmx required data

  Set oDOM2 = CreateObject("MSXML2.DOMDocument.3.0")

  oDOM2.LoadXML xmlhttp2.responseText

  set CallTask2 = oDOM2.SelectSingleNode("//TaskStartResult")

  CallTask = "Success"

End Function

//Please find the while reloading from accesspoint

Highlighted

Re: Reload Application from Accesspoint in QV 11 verson using Macro

And what is your question?

BTW loose the MsgBox calls. There is no User Interface for your macro code when running this code under QVS control.

Best,

Peter