How to do search with dynamic criteria operators? Daisy chain method only?

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

Hi! Same pb here! Did you find a solution? Maybe w/ a plugin?

So far, I have 2 solutions.

  1. daisy chain the filters
  • Save each filter (field, operator, value) in a datatype
  • Apply each filter one after another
  • Pro: clean
  • Con: can be slow
  1. 1 data type that with each field+operator s field name and the value type as the field type, e.g. Name Contains (type Text).
  • Do a regular search for all field+operator in one search
  • Pro: fast
  • Con: ugly and can’t have multiple instances of the same field+operator.

This topic was automatically closed after 70 days. New replies are no longer allowed.