Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Showing popup on Document Load

Hi all,

I have a query, which might return some data.

If the query doesn't return any data, I need to show an Alert window saying 'Query did not return any data'

This thing, I need to do on document open.

How can I achieve that??

Thanking in advance.

5 Replies
Gysbert_Wassenaar

Create an Alert. You can use the Alert Wizard from the Tools menu to create the alert. If you want a popup when the document contains no data you can use count(MyField)=0 as alert condition. MyField is any field that should contain data if the query did retrieve data.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for replying Gysbert.

I want to have an 'OK' button also in the alert window.

And I don't want to use any macro for doing it.

How can I achieve these thing.

Thanking in advance.

alexandros17
Partner - Champion III
Partner - Champion III

AAA:

select * from myTable;

Let xxx = NoOfRows('AAA');

in this way you have the no of rows from table AAA into the variable xxx.

now go in tools->alerts, click add, in the message write your message and in condition write: $(xxx) =0

Let me know

Gysbert_Wassenaar

The alert window cannot have a button. You simply click it to make it go away. Using an alert is the easiest way to do what you want (except for the OK button). Otherwise you'll have to use triggers, variables and text objects that show/hide themselves. And the triggers may not work in the ajax client. In short, use alerts.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Alessandro,

Yes this is working.

Can I customize the alert window to show some buttons(Like OK, Cancel)??

Thanking in advance.