I would like to filter out rows that have Quantity < 1 (i.e., = 0). I'm comfortable programming, but I'm not sure if there's already a built-in way to do it.
The table in the URL syncs with a Google spreadsheet (thank you for that feature!). I'd basically like to have a default filter on the column of "> 0", which is similar to the "predefined value" of the filter column, but it can only be specific values, not a formula.
If I can't hide the row, I can use conditional formatting to grey out the row, but ideally I could hide it.
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
I am not sure i fully understood exactly what you need to achieve.
1. If you just need to hide any rows that have value in Quantity less than 1, with a Google Sheet Table, one way is with Conditional Formatting.
Like this, here is my Test Table :
A Condition like : Check if any cell of this Column is less than 1 , in that case, set the row CSS class to "hide".
2. Or if you don't wish with the Conditional, but to allow users to change the Filter/clear it;
Then you can set a Number Range Filter, and set the "from" value to be predefined as "1".
Please check the Documentation on the hyperlink with our example.
With a Number Range, you need to use the " | " stick symbol for the URL predefined filter parameter on this Column in order to get only the "from" value on the number range.
I would like to filter out rows that have Quantity < 1 (i.e., = 0). I'm comfortable programming, but I'm not sure if there's already a built-in way to do it.
The table in the URL syncs with a Google spreadsheet (thank you for that feature!). I'd basically like to have a default filter on the column of "> 0", which is similar to the "predefined value" of the filter column, but it can only be specific values, not a formula.
If I can't hide the row, I can use conditional formatting to grey out the row, but ideally I could hide it.
Hi Abigail,
Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.
-
I am not sure i fully understood exactly what you need to achieve.
1. If you just need to hide any rows that have value in Quantity less than 1, with a Google Sheet Table, one way is with Conditional Formatting.
Like this, here is my Test Table :
A Condition like : Check if any cell of this Column is less than 1 , in that case, set the row CSS class to "hide".
2. Or if you don't wish with the Conditional, but to allow users to change the Filter/clear it;
Then you can set a Number Range Filter, and set the "from" value to be predefined as "1".
3. Another way can be via URL pre-filtering.
Please check the Documentation on the hyperlink with our example.
With a Number Range, you need to use the " | " stick symbol for the URL predefined filter parameter on this Column in order to get only the "from" value on the number range.
On my example the full URL is :
Since the URL pre-filtering uses a zero based index for column number, my "Quantity" Field is indexed as number 2, so i add this as parameter :
?wdt_column_filter[2]=1|
-
I hope that one of these methods can achieve your goal, but let me know if i misunderstood it.
Thanks.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables