Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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.
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
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.
Hi Alessandro,
Yes this is working.
Can I customize the alert window to show some buttons(Like OK, Cancel)??
Thanking in advance.