How to filter with updated_by_id and created_by_id or deleted_by_id ?

dangquocmin - 3 months ago

I'm really want to using filter with updated_by_id and created_by_id or deleted_by_id, but I not found document for that. I had try some code but it not working. Please let me know, how to do that. Thank you.

Answer

- 3 months ago

Hey there! I just wrote up a guides document to help you along: https://pyrocms.com/help/developer-tools/table-builders/custom-filters

A simple custom query will do it!

Keep in mind you can use the default \Anomaly\Streams\Platform\Ui\Table\Component\Filter\Query\GenericFilterQuery::class for your filter if your filter slug is created_by_id for example. Otherwise you'll need a custom query to check both columns.

ryanthompson - 3 months ago

Hey there! I just wrote up a guides document to help you along: https://pyrocms.com/help/developer-tools/table-builders/custom-filters

A simple custom query will do it!

Keep in mind you can use the default \Anomaly\Streams\Platform\Ui\Table\Component\Filter\Query\GenericFilterQuery::class for your filter if your filter slug is created_by_id for example. Otherwise you'll need a custom query to check both columns.

dangquocmin - 3 months ago

Thank you so much. I will try it. And I think you may add this to core feature. It is helpful.