I am building dynamic search critera. User can select fields, operators and select or type in values. For example,
fields: gender, name, etc.
operators: is, is not, contains, doesn’t contains
A user can build a set of the following criteria:
- gender is male
- name contains Matt
We can’t dynamic choose the operator in a search constraint. What is the best way to create a filter list?
I am thinking to use a custom event with to filter each field with many steps with conditions handle each operator so a main workflow will call custom events one after another to filter each field on the same list that is getting more filtered after each step. But it is a lot of work and most likely will be slow.
A workflow to filter “name” field with
- a step with condition <operator is “is”>, constraint will be name is Matt
- a step with condition <operation is “is not”>, constraint will be name is not Matt
- a step with condition <operation is “contains”>, constraint will be name contains keyword Matt
- a step with condition <operation is “doesn’t contain”>, constraint will be name does not contain keyword Matt
