Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Checkbox functionality with a table box and date comparision

Hi All,

I need your help with my requirement here.

1. I've a Start Date and End Date fields which are defaulted to the current date. User can change these dates as below.

ScreenHunter_118 Jun. 27 17.45.jpg

2. I've a table box with information , for example, Student Information

ScreenHunter_118 Jun. 27 17.42.jpg

3. I've a checkbox ScreenHunter_118 Jun. 27 17.35.jpg to include/exclude DOB in the search with the dates given above. Checkbox is a listbox with one value.

My requirement is: if the checkbox is checked, then table box should include Date of Birth as a filter, otherwise it should display all the students information i.e. table box should display as below

ScreenHunter_118 Jun. 27 17.40.jpg

When I uncheck the checkbox, the table box should display all the data as below

ScreenHunter_118 Jun. 27 17.42.jpg

Appreciate help !!

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I think you can add this logic to your search string in the select in field action:

=if( GetSelectedCount( YourFieldInListBox ) = 1 , '>=' & vStartDate & '<=' vEndDate )

View solution in original post

4 Replies
swuehl
MVP
MVP

A table box won't allow you to set expressions or calculated dimensions to filter your data, so if you need to stick with the table box (instead of using a table chart), you can try to use a trigger on the selection of your field you are using in the check box style list box (set the trigger in Settings - Document Properties - Triggers - Field Event Trigger), then create a Select - Select in Field action on your field DOB with a search expression like

='>=' & vStartDate & '<=' vEndDate

Not applicable
Author

Thanks Swuehi.. it worked. However, when I uncheck the checkbox, I've set those variables to blank i.e. I've to remove the date filters.

set the trigger in Settings - Document Properties - Triggers - Field Event Trigger - doesn't have any options to recognize whether use is checking or unchecking.


Thanks in advance !!

swuehl
MVP
MVP

I think you can add this logic to your search string in the select in field action:

=if( GetSelectedCount( YourFieldInListBox ) = 1 , '>=' & vStartDate & '<=' vEndDate )

Not applicable
Author

This worked.. Thanks so much Swuehl