Hi,
I have a dropdown with year
=Year
2011=2011
2012=2012
2013=2013
2014=2014
2015=2015
2016=2016
2017=2017
2018=2018
when year selected the filter should not appear in query
versions.programs_id:{data:sel_programs}/-
year(enrollments.exam_passed):{data:sel_year}/-
enrollments.exam_score/>=:{data:sco_min}/-
enrollments.exam_score/<:{data:sco_max}/-
and it apears and make filter on empty date (0000). so i would want all year
regards
Chris
I have a dropdown with year
=Year
2011=2011
2012=2012
2013=2013
2014=2014
2015=2015
2016=2016
2017=2017
2018=2018
when year selected the filter should not appear in query
versions.programs_id:{data:sel_programs}/-
year(enrollments.exam_passed):{data:sel_year}/-
enrollments.exam_score/>=:{data:sco_min}/-
enrollments.exam_score/<:{data:sco_max}/-
and it apears and make filter on empty date (0000). so i would want all year
regards
Chris
Hi Chris,
The "-" will not be enough here, you will need a PHP action to check the value and unset it if its empty
Best regards
The "-" will not be enough here, you will need a PHP action to check the value and unset it if its empty
Best regards
Hi Chris,
Not very difficult too, just the code below:
Best regards
Not very difficult too, just the code below:
if(empty($this->data("sel_year"))){
$this->set("sel_year", null);
}else{
$this->set("sel_year", $this->data("sel_year"));
}Then use {var:sel_year} in your code!
Best regards
This topic is locked and no more replies can be posted.
