Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Alerts Via Macros

How we can write alert script in macros...

Regards

Sikandar.

1 Solution

Accepted Solutions
manishkumar75
Partner - Creator II
Partner - Creator II

Hi Sikandar,

Sample Macro for 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

You can take help from QlikView API guide.

- Manish

View solution in original post

13 Replies
manishkumar75
Partner - Creator II
Partner - Creator II

Hi Sikandar,

Sample Macro for 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

You can take help from QlikView API guide.

- Manish

Not applicable
Author

Hi Manish

Thanx Manish.where i can find QLIKVIEW API guide?

Regards

Sikandar

Not applicable
Author

C:\Program Files\QlikView\Documentation

Not applicable
Author

Thanx Arum

Regards

Sikandar

Not applicable
Author

HI Manish

Can u send me any example qvd of urs of making alerts beacause i m having sum problems.Thanx

Regards

Sikandar

manishkumar75
Partner - Creator II
Partner - Creator II

Hi Sikandar,

Please find the sample QV Application for Alerts.

- Manish

Not applicable
Author

Hi Manish.

I have created the Alert Macro.i am having problem regarding how to apply it. My Scenario is that i have a pivot table in which their is a column of Total Sales.My Total Sale is supoose 45555.I wana do this that when i press the button object ,it must popup the alert window of saying that ur sales is this....or some thing else..It must show the alert on pressing the button object as i have seen in the alert properties ,it gives only three options regarding poping up the window.There is no option of poping up the alert window on pressing the button object.Thank u so much.

Regards

Sikandar

manishkumar75
Partner - Creator II
Partner - Creator II

Hi Sikandar,

You can specify it in Condition ( Sale > 40000) etc.

- Manish

Not applicable
Author

Hi Manish

Thanx.Manish i m describing you again my scenario ..i need to achieve this.The Script which u send me for creating a alert through macro is sucessfully

running.its creates an alert and the alert is working on opening the application ,reloading the application and when the data is reduced.But after that i

want is that the button sheet object pop up the alert window when i press the button.The alert window should popup on pressing this button sheet o

bject .I donot want the alert window be poping up on reloading the application or opening the application or when the data is reduced.I want this that

when the user press the button object the alert window has to pop up on that time not on reloading,opening or when the data is reduced.

Regards

Sikandar