Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
yasmeenk
Partner - Creator
Partner - Creator

Passing Values from one QVW to another QVW using Macro

Hi,

I am trying ODAG in QlikView. I have two apps - One act as selection and another as Responder app.

I am facing an error in the Macro script. Could someone help me out to solve this issue?

Issue - While clicking on "Test" it shows "Object required:'v'"

Note: Already created EDXparms as a Variable and am able to get the selected OrderIDs into that Variable. But I can't reload the Responder Application because of this issue.

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Did you add the EDXparms variable to your ODAQ Qlikview qvw?

View solution in original post

8 Replies
m_woolf
Master II
Master II

You might try storing the Var.getcontent.string in a variable and then using that variable in the v.setcontent expression.

yasmeenk
Partner - Creator
Partner - Creator
Author

Thanks for your response. I have already tried that method. But still no use

m_woolf
Master II
Master II

Can you post a sample qvw showing the problem?

yasmeenk
Partner - Creator
Partner - Creator
Author

Yes, Am attaching the sample selection app and responder app with Order.xls data.

m_woolf
Master II
Master II

You didn't have EDXparms defined in the ODAQ Qliview qvw.

I made a few changes in your selection macro:

sub selection

  set v = ActiveDocument.Variables("EDXparms")

  EDXparms = ""

 

  '-- OrderID

  set mySelections =ActiveDocument.fields("OrderID").GetPossibleValues

  if EDXparms <> "" then EDXparms = EDXparms & chr(124)

  EDXparms = EDXparms & "OrderID="

  EDXparms = EDXparms & mySelections.Item(0).text

  for i = 1 to mySelections.Count - 1

    EDXparms = EDXparms & chr(44) & mySelections.Item(i).text

  next

msgbox EDXparms

  v.SetContent EDXparms,true

set App=ActiveDocument.GetApplication

set TemplateDoc = App.OpenDoc ("C:\Users\ra053499\Downloads\ODAG Qlikview.qvw","","")

set v = TemplateDoc.Variables("EDXparms")

' msgbox EDXparms

v.SetContent EDXparms,true

' msgbox v.GetContent.string

'set Cname = App.GetProperties.Computername

TemplateDoc.SaveAs "C:\Users\ra053499\Downloads\ODAG.qvw"

TemplateDoc.Reload

 

end sub

yasmeenk
Partner - Creator
Partner - Creator
Author

Thanks for your efforts. But still it showing as Object required

m_woolf
Master II
Master II

Did you add the EDXparms variable to your ODAQ Qlikview qvw?

yasmeenk
Partner - Creator
Partner - Creator
Author

Hi,

Have you tried this ODAG concept on QlikView Server?