Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Problem Using SetSymbol Method in Qlikview and R integration ?

I am working on qlikview and r integration, below i have written a macro which integrate QV and R.But i am facing problems in passing value of a Qlikview variable to my R script. I have used SetSymbol funcion which vb script variable to r variable.

sub test

'Asigning the value of a QvVariable to to V

set v = ActiveDocument.Variables("vQvVariable").GetContent

'Creating rcom object

set R = CreateObject("StatConnectorSrv.StatConnector")

R.Init "R"

'creating a varible in r

R.EvaluateNoReturn "diff<-0"

'Assigning value of v to diff

R.SetSymbol "v",diff

R.EvaluateNoReturn "c<-576+diff"

result=R.GetSymbol("c")

R.close

ActiveDocument.Variables("vVariableDisplay").SetContent result, true

MsgBox("Result")

End Sub

Thanks for the help.

2 Replies

Re: Problem Using SetSymbol Method in Qlikview and R integration ?

Try:

set v = ActiveDocument.Variables("vQvVariable")

getVariable = v.GetContent.String

- Marcus

balkumarchandel
Valued Contributor II

Re: Problem Using SetSymbol Method in Qlikview and R integration ?

Community members this not for asked qtn.

Hi Rehan

See this link for task scheduling..

Not able to msg you privately

How do I create tasks in QMC?

Thanks

BKC

Community Browser