Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Using Dropdown Filter on Bool is not working 21 Feb 2016 23:48 #13834

When using the drop down filter for bool fields , it does not work. Regardless of selecting yes or no the list remains the same.

Please Log in or Create an account to join the conversation.

Using Dropdown Filter on Bool is not working 07 Mar 2016 19:45 #13848

In the plural model there is an error in this.
Somewhere above $this->applySqlStates($query); in the prepareQuery function you probably have:
		//WHERE - FILTER : SomeBool
		if($filter_somebool = $this->getState('filter.somebool'))
		{
			if ($filter_somebool !== null){
				$this->addWhere("a.somebool = " . (int)$filter_somebool);
			}
		}

that does not work, copy the prepareQuery function in a forked plural model file and change the filter for the boolean:
		//WHERE - FILTER : SomeBool
		if($this->getState('filter.somebool') !== null)
			$this->addWhere("a.somebool = " . (int)$this->getState('filter.somebool'));

Cheers

Please Log in or Create an account to join the conversation.

Using Dropdown Filter on Bool is not working 06 Apr 2016 18:51 #13877

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Fixed.

Might be better now.
Coding is now a piece of cake
The following user(s) said Thank You: jonathanbell

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.077 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started