WordPress.org

Ready to get started?Download WordPress

Forums

Participants Database
[resolved] pdb_list filter issues (7 posts)

  1. corebound
    Member
    Posted 1 year ago #

    Me again :)

    Having some trouble with one of my lists filters. I've already got my list working to filter our active vs. inactive members of the group I support. That filter looks like this:
    [pdb_list filter='active=yes' orderby='join_date, rank' order='ascending']
    The other working list is simply active=no. The other lists I am trying to display sorts the members into different groups based on games their signed up for. Like thus:
    [pdb_list filter='sponsored_games=Planetside 2' orderby='join_date' order='ascending']
    This shows no results. I presumed the problem might be one of two things:

    • The spaces in the name, which I tried encapsulating the name in single or double quotes with no effect. That theory fails since one of the options is 'Minecraft' and has no spaces.
    • Is it possible because that field is a multi-select box and having multiple values is causing the problem?

    My testing page is here: http://solnavy.com/participant-test/

    Sample data:

    username	join_date	rank	sponsored_games	confirm	email	active	id
    SKillelea	11/1/2004	Member	Planetside 2	19		Yes
    IceGhost	1/1/2004	Member	World of Warcraft, Planetside 2	19		Yes

    Thanks again.

    http://wordpress.org/extend/plugins/participants-database/

  2. corebound
    Member
    Posted 1 year ago #

    here is a screenshot of my fields: http://www.coreboundsolutions.net/images/pdb_fields.JPG

  3. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    corebound,

    If you want to do a search on a field that is a multi select, and you've got items in there that contain spaces, you won't be able to use "strict" searching...so make sure that is turned off. Now, you should be able to search more generally for "planestside" or "warcraft" and get your hits. You should also be able to search for "world of warcraft" and get hits.

    If this isn't precise enough, you'll probably have to construct a custom search function, but I just tested this and it looks like it should work for you.

  4. corebound
    Member
    Posted 1 year ago #

    Searching is not so much my issue right now, just sorting the table by the Sponsored_games column. I've changed the filter='sponsored_games=Planetside 2' attribute any number of ways, from case sensitive, to wildcards, but I could not get it to display just those members.

  5. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    corebound,

    I'm sorry to say you are correct. The filter function cannot work properly on multi-select fields. I have added this to the bug list and I should have a fix for it in the next release. If you want me to provide you with a temporary fix, let me know.

  6. corebound
    Member
    Posted 1 year ago #

    Ok sorry for the overdue reply. I finally got a few minutes to do some more troubleshooting. I was able to get it to work, albeit I had to use the '~' operator to do so (which you cautioned against :) ).

    So here is the final result showing the different filter sets in each tab: http://solnavy.com/about-sn/roster/

    Here is how I accomplished it:

    [pdb_list filter='sponsored_games~Planet' orderby='rank_value' order='ascending']
    [pdb_list filter='sponsored_games~World' orderby='rank_value' order='ascending']
    [pdb_list filter='sponsored_games~Mine' orderby='rank_value' order='ascending']

    I'd still prefer to be able to use '=' but i'm just stoked it's working. I'll go ahead and tick this as resolved since I have a workaround till an official fix. Thanks again.

  7. xnau
    Member
    Plugin Author

    Posted 1 year ago #

    corebound,

    Great you found a workaround. I'm working on an interim release (the major release is taking too long) that has this fix in it. Should be out in a week.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic