Custom Default Filter

I think I saw a feature request similar to this but now I cant find it so here goes.

I just updated on app from 2021 with the new table. It has 8 filters. I was using JSON SQL to do the table filtering but now I can now link 7 of those filters to my components using Default Filters.

image

But I can't to the 8th.

It is a Low Stock check and its logic is QOH < reorder_trigger both of which are table columns. Both of these fields are in the result set, but I cannot wire this to my check box.

I would like a JS Filter Type that calls some JS, which would have access to currentRow, and returns true/false.

Hey @bradlymathews! You can set default filters to filter on custom columns, so conceivably, you could have a hidden column low_stock that holds the value {{ currentSourceRow.QOH < currentSourceRow.reorder_trigger }} and then filter for when that column is true:

Does that work well?

1 Like