Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have an Alert that sends an email each time the QVW reloads, but some days I maybe testing and I will reload many times.
I want to create a button on the front end to disable the Alert.
Something like
SUB disablealert
ActiveDocument.GetAlert("AL04").Enabled = false
END SUB
But this is not working
Regards
Alan
Please check the attached sample qvw.
Hello Alan,
Haven´t tried anything similar but, maybe setting the condition of the Alert to False can disable it while you are testing. Does this make any sense?
Hi SLATO,
I know I can do that, but I wanted to create a button to disable it without having to go to
Tools >> Alert and Unticking the Enabled Tick Box
I want a button to trigger the macro to do this, lazy I know!
Regards
Alan
Am I even close with the Macro I am Attempting to change
I also tried the following, but still no Joy
Set a variable on button click and use that variable value as alert condition.
Maybe you could set or modify the conditions from alert with an additionally variable - abe a look on this example from APIGuide.qvw:
rem create new alert
set docprop = ActiveDocument.GetProperties
set al = docprop.Alerts
al.Add
no = al.Count-1
al.Item(no).Action.Id = "AL03"
al.Item(no).Action.Message.v = "Hello world!"
al.Item(no).Comment = "New alert"
al.Item(no).Condition.AllClear = false
al.Item(no).Condition.BookmarkId = "BM01"
al.Item(no).Condition.Condition.v = "sum(Sales)>Sum(Budget)"
al.Item(no).Enabled = true
al.Item(no).Triggers.Interactive = true
al.Item(no).Triggers.OnPostReload = true
ActiveDocument.SetProperties docprop
- Marcus
Can you give any further information!
Hi Marcus,
I looked at the API Guide still can't get it working
Regards
Alan
Please check the attached sample qvw.