I’m trying to set up a datagrid choice filter for one of my columns, I’ve had no issues doing this in the past, but what I want to do differently this time is not match the string exactly, but match with a wildcard. I have the following filter:
YAML
1
2
3
4
5
6
7
8
9
10
11
filters:
status:
type: choice
data_name: o.status
options:
field_options:
multiple: true
choices:
Shopping: Shopping
'Finished.Completed': Completed
'Finished.Failed': Failed
Which works fine for any status of ‘Finished.Completed’ or ‘Finished.Failed’ as these can match my status exactly. The issue comes with the ‘Shopping’ status, which can be ‘Shopping.Ongoing’ or ‘Shopping.Checkout’. Basically I want to match anything that starts with ‘Shopping’.
I’ve tried various things but the documentation is really lacking for the choice filters. Any tips on how to achieve this? Do I need to write a custom filter?
Brilliant! It works with a couple of modifications to SelectLikeFilter. Just with an extra use for FilterUtility and with wildcards round the $value when setting the query parameter. Thanks!
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.
We collect cookie information with a goal to provide you with the best user experience. By using this website, you agree to our use of cookies. Read Oro Inc.’s Cookie policy.