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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Macro in 9 to click buttons, or other solution

Hi I have a problem where, when the application is published using publisher, all of the buttons and images have red x's. When you click on the button to activate another sheet, then click on the button to activate the original sheet it shows everything as expected. There is an open ticket for that and hopefully someone over there at QV can figure it out.. but until then we need to deploy this with a workaround. So basically what i'm trying to do is have the macro accomplish the same actions we have to do to get the images to display as a workaround since there have been several qliview consultants that have not been able to fix the the underlying problem.

What i have tried is:

1. onOpen for the Document, action = ActivateSheet (for the sheet we want them to be on with all images displaying. since it defaults to that sheet maybe it doesn't refresh it, just knows its there so does nothing

2. Save file on new/different active sheet, then onOpen for the Document, action = ActivateSheet, activating the sheet we ultimately want opened (with all images showing)

3. Save file on new/different active sheet, then onOpen for the document, action = ActivateObject, activating the button that we click on to activate the sheet that is not showing the images.

None work, anyone have any clues?

We are publishing this using the AJAX client by the way.

Thanks in advance.

3 Replies
johnw
Champion III
Champion III

Maybe save the file with the correct active sheet. OnOpen for the document, wait for idle, activate another sheet, wait for idle, activate the original sheet. I haven't played with version 9 much, but I assume those are all possible actions. The idea is to simulate EXACTLY what you're doing by switching back and forth after you open the document.

Not applicable
Author

Thanks i'll give that a shot.. have been looking around for what the syntax for that would be.. sleep? wait? is it applied to ActiveDocument? not having much luck finding the syntax.

johnw
Champion III
Champion III

I haven't done it with actions, so I'd be looking around the same as you. In a macro, it's this:

ActiveDocument.GetApplication.WaitForIdle