Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Clearing selection and setting sheet on Publisher reload (qv9)

Hi There,

I am looking to get selections cleared and default page set when publisher reloads data, as presently if the document is saved with selections by mistake that default selection persists until someone sorts it out.

I have attempted a solution that goes like this:

Created a variable osUser, with a value of =OSUser()
Set OnPostReload event to fire PublisherClearSelections
Created the macro PublisherClearSelections as below


sub PublisherClearSelections
vOSUser = ActiveDocument.GetVariable("osUser").GetContent.string

if instr(vOSUser, "QVPublisher") > 0 then
ActiveDocument.ClearAll
ActiveDocument.ActivateSheet("Home")
end if
end sub


This works fine in QV Developer, but doesn't seem to work when kicked off by Publisher. I am reasonably confident in the OSUser name being right for our environment.

I would have expected a way of doing this in the Reload script, rather than relying on a trigger occurring, but I have not found a way of doing this.

Any suggestions welcome.

Thanks,
Steve

1 Solution

Accepted Solutions
Employee
Employee

Clearing selection and setting sheet on Publisher reload (qv9)

Steve,

Marcos cannot be ran by publisher. QVS 9 reference manual page 224. "

QlikView Distribution Service does not execute any macros that may exist in

the Source Document."

You could do an "on open" marco that when the document is open it would do these. Then the server went it open the document would run the macro.



4 Replies
Employee
Employee

Clearing selection and setting sheet on Publisher reload (qv9)

Steve,

Marcos cannot be ran by publisher. QVS 9 reference manual page 224. "

QlikView Distribution Service does not execute any macros that may exist in

the Source Document."

You could do an "on open" marco that when the document is open it would do these. Then the server went it open the document would run the macro.



Not applicable

Clearing selection and setting sheet on Publisher reload (qv9)

Hi there,

Well spotted on the fact that publisher will not execute macros.

Your suggestion of using OnOpen works fine.

Many thanks,
Steve

Not applicable

Clearing selection and setting sheet on Publisher reload (qv9)

My question is that if the model is having on several occasions, as an example 15 times a day, runs the 15 times?
sukydhak
New Contributor III

Clearing selection and setting sheet on Publisher reload (qv9)

Guys

I have another problem.

At present, i'm using QT for polling data from a number of xls file and have a marco that inserts this data into our forecast system. The issue is my reload runs via the server but someone has to open the qvw to push the button to insert the data into the database.

Can this all run via the server?

Community Browser