Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I have an alert which I want to fire OnOpen but only if the client is the windows client (not the plugin).
The only way I can test for the client is via API with:
ActiveDocument.GetApplication.QTProduct
I could create a document OnOpen trigger that sets this value in a variable and then test the variable in the alert.
My question is, which fires first - the Alert or the Document OnOpen trigger? Obviously I want the OnOpen event to have set the variable before the Alert tests it but if not I will have to replicate the trigger action with a document OnOpen macro instead (and I want to email etc)
Any comments?
Thanks.
Gordon
Actually, I can get around this by first setting off all the Alert events, attaching a macro as the document OnOpen event and then testing within it whether the Alert condition is satisifed and then if so forcing the Alert action.
My problem now is that the Alert mode doesnt affect the Alert condition and I only want to fire it if its interactive (not batch)....but how to test for that?
Regards,
Gordon
Hi Gordon,
I do have a similar problem with the OnOpen event on Document vs Alert. I understand your alternative that your macro will fire the alerts. I guess you have used a similar code as follows:
set albm = ActiveDocument.GetAlertAndBookmark(AlertID)
'msgbox alertID & albm
set alertstatus = ActiveDocument.CheckAlert(albm.Alert, albm.Bookmark)
if alertstatus.Default then
set act = alertstatus.Action
ActiveDocument.PerformAlertAction act
end if
But for my requirements, I can't skip the OnOpen on Alert, as I am checking the security level of the user, and if it is set to "Stop all Module Script", then the macro won't be called...
Here is more detail of my requirements: http://community.qlik.com/message/140870#140870
Do you have any alternative in mind?
Thanks in advance,
Nicolas,