Welcome, Guest
Username: Password: Remember me

TOPIC: Filtering across Multiple Fields

Filtering across Multiple Fields 16 Feb 2013 12:26 #6779

  • dave1167
  • dave1167's Avatar
  • Offline
  • New Member
  • Posts: 10
  • Karma: 0
Hi All

I am struggling with how to do this

I have 2 name fields Rota 1 and Rota 2

I have the following sample data

Rota 1 Rota 2

1. J Smith B Jones
2. H Roberts J Smith
3. W Miles E Prior

I have one filter box and I can filter OK on Rota 1 but I want to to be able to display records filtered on both fields without having to have multiple filter boxes

i.e. if I filter on J Smith

Rota 1 Rota 2

1. J Smith B Jones
2. H Roberts J Smith

I think I need to insert some sort of 'OR' statement or be able to use multiple fields in the Datakey/Datavalue but I have no idea how to do this. Anyone got any ideas?

Thanks in advance
Dave
The administrator has disabled public write access.

Re: Filtering across Multiple Fields 18 Feb 2013 11:19 #6808

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Hi @dave1167

This is not currently possible 'out of the box' and I'm not sure if some of the advancements in the filters of the forthcoming Cook 2.5 will help...

In the meantime, to workaround this, I'd recommend taking a copy of the ajax combo class & assets, rename it (them) and then call this instead of the regular class in your filter. There might be an easier way, possibly by adjusting the displayAjax() method in your view but, I guess it depends how many layouts in which you wish to call this filter.

Hope it helps!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.
Time to create page: 0.085 seconds

Get Started