Using Filter addon with only one column
-
Tobias, great work on this plugin. I hope I’m not missing an obvious answer here. In any event, thanks in advance.
We’re pulling in a member list in CSV that comes from a separate source, and we only want to display members who haven’t opted out of the list. In the source CSV, the column is “OPT_OUT” and the values are 1 (yes, opt out) and 0 (okay to display). Therefore, we want to only display those members where the OPT_OUT column equals 0.
So I’m working with the Table Row Filters premium plugin, but I need to only search in that one column.
I didn’t see it in the documentation, but filters also includes a filter_columns parameter. After many attempts, I finally figured out the syntax.
[table id=1 filter="0" filter_columns="35" /]
Seems obvious now, but having hidden a number of other columns from our source CSV, it took a while to realize that the column number is counted based on the total columns in the source, not just the visible ones. And I’m embarrassed to say how many attempts I made using OPT_OUT.
So, we’re good, except the filter parameter doesn’t seem to like a value of zero. If I set the above to filter=”1″, I get the 35 members who have opted out, but set it to filter=”0″ and I get all records — ones and zeroes.
Am I missing something?
- The topic ‘Using Filter addon with only one column’ is closed to new replies.