Title: [Plugin: Participants Database] Filter using commified names
Last modified: August 20, 2016

---

# [Plugin: Participants Database] Filter using commified names

 *  Resolved [SFGolfer](https://wordpress.org/support/users/sfgolfer/)
 * (@sfgolfer)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/)
 * I can search both the front and back ends using commified names (Doe, John) but
   it doesn’t work via the shortcode filtering similar to:
 * `[pdb_list fields="emp_name" filter="emp_name=doe, john"]`
 * [http://wordpress.org/extend/plugins/participants-database/](http://wordpress.org/extend/plugins/participants-database/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714644)
 * SFGolfer,
 * What are your trying to filter here? Two fields? If so, you need two statements
   such as filter=”first_name=john&last_name=doe”
 * Otherwise, you’re searching for an entry in the emp_name list that is literally“
   doe, john”
 * This is one way putting the whole name into a single field can limit your options,
   and as it now stands, the filtering can’t search for anything with a space in
   it.
 *  Thread Starter [SFGolfer](https://wordpress.org/support/users/sfgolfer/)
 * (@sfgolfer)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714646)
 * Yes, it is one field with “doe, john” as its value.
 * I did find a workaround. Simply do two filters, one for the last name and one
   for the first name.
 * `[pdb_list fields="emp_name" filter="emp_name~doe&emp_name~john"]`
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714648)
 * Hey– good one. Never thought of that!
 *  [siteurl](https://wordpress.org/support/users/siteurl/)
 * (@siteurl)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714702)
 * `and as it now stands, the filtering can't search for anything with a space in
   it.`
 * 🙁
 * I was trying to implement this. I was trying a filter state=New York
 * This works in search but not in filters
 * Also is there a way to dynamically pass the filter values between pages or posts?
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714703)
 * siteurl,
 * Yes filtering doesn’t work with spaces. You can try using the filter without 
   the space at all: [pdb_list filter=”state=NewYork”]
 * For your second question, you’ll need to do some coding with your templates to
   accomplish this. You can call the shortcode with a do_shortcode() function in
   your template which allows you to use dynamic values in the shortcode.
 *  [elmaluf](https://wordpress.org/support/users/elmaluf/)
 * (@elmaluf)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714741)
 * Hi, I have a dropdown field wich name is “category”. It have several values: “
   Elite (from 12 to 20 years)”, “Promotional (from 21 to 30 years)”, etc.
 * I’m trying to use filter:
 * >  [pdb_list fields=”last_name, first_name, category, confirme, photo” orderby
   > =”category” order=”asc” **filter=”category=Elite (from 12 to 20 years)”**]
 * But it doesn’t work. What is the problem?
 * Thank you
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714746)
 * elmaluf,
 * Yeah, those parentheses are probably not going to work. Have you tried doing 
   a partial match? filter~Elite
 *  [jue_mue](https://wordpress.org/support/users/jue_mue/)
 * (@jue_mue)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714748)
 * Hi Roland
 * I also have a problem using the filter option. When using this code
 * [pdb_list fields=”first_name, last_name, entreprise, city” orderby=”city” filter
   =”site=Oui/Ja”]
 * I get the message that no records have been found. I tried to change the ‘site’
   field (radio) by not using the ‘/’ but it does not work to.
 * Thanks for any hint.
 * Regards,
 * Juergen
 *  [jue_mue](https://wordpress.org/support/users/jue_mue/)
 * (@jue_mue)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714749)
 * Ok, I found a workaround by replacing ‘~’ with ‘=’ but this might result in false
   results when using longer or more complex strings.
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714750)
 * jue_mue,
 * Search terms with a slash or space will not work, so you will need to find a 
   way around that.
 *  [jue_mue](https://wordpress.org/support/users/jue_mue/)
 * (@jue_mue)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714751)
 * That is what I thought… spaces neither. But with ‘~’ it’s fine for the moment…
 * Thanks for this brilliant plugin,
 * J.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘[Plugin: Participants Database] Filter using commified names’ is closed
to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 11 replies
 * 5 participants
 * Last reply from: [jue_mue](https://wordpress.org/support/users/jue_mue/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-participants-database-filter-using-commified-names/#post-2714751)
 * Status: resolved