WordPress.org

Ready to get started?Download WordPress

Forums

TablePress
[resolved] Filtering (8 posts)

  1. mjurglavitch
    Member
    Posted 1 year ago #

    Hello Tobias,

    I am trying to filter a table but it is not working. Here is the shortcode that I am using:

    [table id=KronumLeagueStatistics hide_columns="c,f-p,r-ai" show_rows="1-6" hide_rows="6-115" row_order="sort" row_order_sort_column="q" row_order_sort_direction="DESC" datatables_counter_column="true" datatables_paginate="false" filter="WB" /]

    If you go to my webpage (http://kronum.com/league/statistics/leaders/defense/), under the heading 'Save Percentage" I want to only show 'WB' in the 'POS' column. Do I have the wrong code? How can I filter to accomplish this?

    Any and all help would be appreciated. Thanks!

    http://wordpress.org/extend/plugins/tablepress/

  2. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post.

    This is indeed a very tricky problem, as you are using several Extensions that directly influence the table data.
    Especially the Filtering Extension and the Row Order Extension, together with a manual "hide_rows" parameter are really tricky...

    I have done some work on this in the current developer version of TablePress and of the Row Filter Extension. My suggestion therefore is to try again with these developer versions:
    http://tablepress.org/download/tablepress-dev.zip
    http://tablepress.org/download/extension/tablepress-row-filter-dev.zip
    Please download these and replace your current version with them.
    Also, please make sure that you are using the latest version of the Table Row Order Extension from http://tablepress.org/extensions/table-row-order/

    Regards,
    Tobias

  3. Julie Kuehl
    Member
    Posted 1 year ago #

    Hmmm.... this sounds a lot like my situation. I have a master table that I have copied a dozen times so I can hide specific combinations of rows and columns. This is not a good way to handle this and it quickly causing problems as we try to keep it updated.

    Filtering by keywords in two columns would have the same effect, i.e., filter by column="Audience" value="Teams" AND column="Format" value="Tool". And I might like to hide those two columns in the result as they would all have the same value at that point.

    My current shortcode is: [table id=13 row_order="sort" row_order_sort_column="A" row_order_sort_direction="ASC" /]

    Can you recommend the best way to handle this at the present time? It doesn't seem quite as complicated as mjurglavitch's situation, but it might be just as tricky.

    I should add that the row filtering extension doesn't work as the word "Tool" may show up in multiple columns. I only want to filter if it shows up in the "Format" column.

  4. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Julie,

    thanks for your question.

    Unfortunately, it's not possible to define separate filter words for separate columns, but unless "Tools" and "Teams" (or all other combinates of filter terms) can appear in the same column, this should not be a problem. (In other words: We can restrict the Filtering Extension to certain columns, but can not define independent search terms.)

    First, you should also install the dev versions as described above. Then, this Shortcode could help:

    [table id=13 row_order="sort" row_order_sort_column="A" row_order_sort_direction="ASC" filter="Teams&&Tool" filter_columns="5,6" hide_columns="5,6"/]

    (Change the 5,6 (twice) to the numbers of the "Audience" and "Format" columns.)

    This Shortcode will only show those rows, that have the words "Teams" and "Tool" in columns 5 or 6 (which are the numbers of "Audience" and "Format"), and then it will also hide those columns (as they would have the same value, as you already mentioned). (You could also achieve this hiding by selecting the checkboxes below these columns on the table's "Edit" screen and clicking the "Selected columns: Hide" button. The columns will then marked in red, which means that they will not be visible.)

    Does this help?

    Regards,
    Tobias

  5. Julie Kuehl
    Member
    Posted 1 year ago #

    I'll give it a try and let you know.

    Thanks so much for the awesome response time!!!

  6. Julie Kuehl
    Member
    Posted 1 year ago #

    Works on the test site like a charm!!! This is going to solve a HUGE problem for me.

    Just wondering: how soon might these dev versions go mainstream?

  7. Julie Kuehl
    Member
    Posted 1 year ago #

    And now live on the main site. I have my weekend back! Woo hoo!!!

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    great to hear that this helped! :-) Thanks for the confirmation!

    The final release of these versions should happen this week. I'm just finishing up a few things, like translations.

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.