Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

How do I hide a button that selects a bookmark if that selection would return 0 results?

I have three buttons, each of which activates a bookmark.

Each bookmark is for monitoring purposes - they highlight certain records that require investigation by a user.

eg

Expires Today

Overdue Tasks

New Complaints

Sometimes though, there will be no records for the user to check, so I don't want the relevant button to be visible. If there are no matching results I don't want to waste the user's time clicking on buttons that give them nothing.

How would I hide the button?

EDIT: If this is not possible, as an alternative, how would I return the number of matching rows?

eg

Expires Today (12)

Overdue Tasks (14)

New Complaints (0)

Message was edited by: Andi Mohr

1 Solution

Accepted Solutions
MVP
MVP

Re: How do I hide a button that selects a bookmark if that selection would return 0 results?

You should be able to use set analysis to check the number of records, something like:

=count( {BOOKMARKNAME} FIELDTOCOUNT)

where FIELDTOCOUNT is the field name that you need to count to get your number of records.

BOOKMARKNAME is the name of your bookmark.

I think you can use this expression as is in a conditional show expression for the button (on layout tab of the button properties).

Hope this helps,

Stefan

2 Replies
MVP
MVP

Re: How do I hide a button that selects a bookmark if that selection would return 0 results?

You should be able to use set analysis to check the number of records, something like:

=count( {BOOKMARKNAME} FIELDTOCOUNT)

where FIELDTOCOUNT is the field name that you need to count to get your number of records.

BOOKMARKNAME is the name of your bookmark.

I think you can use this expression as is in a conditional show expression for the button (on layout tab of the button properties).

Hope this helps,

Stefan

Not applicable

Re: How do I hide a button that selects a bookmark if that selection would return 0 results?

Thanks Stefan, this is perfect! This allows me to do both, I can hide the button, and display the number of results.

Community Browser