Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
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.

Labels (1)
2 Replies
marcus_sommer
MVP
MVP

Try:

set v = ActiveDocument.Variables("vQvVariable")

getVariable = v.GetContent.String

- Marcus

Anonymous
Not applicable
Author

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