REST API: Filter block with boolean filter failing

Hi!

Build: nocobase/nocobase:2.0.0-beta.13-full

I created a table from a REST API list request as usual. Then added a Filter form block and added two filters linked to the list, one on Status the other on “Is trial”. The status filter works fine, but “Is trial” causes the error “operatorFunctions[operator] is not a function” which I don’t understand.

I also checked the default operator for the boolean filter which has several alternatives: Yes, No, is empty, is not empty. How do these work?

Much appreciated,
Kevin

Screenshot 2026-01-20 111222

Please refer to:

The filter block is filtering client-side, so configuring the data source filters does not solve the problem.

Could you please explain what the different "Default operator"s do for boolean fields? The default “Default operator” is “Yes” which causes the error. The options are:

  1. Yes
  2. No
  3. is empty
  4. is not empty

I tested them all, and none of the operators work in filtering “is trial” boolean.

I would also like to know how to do server-side filtering from the UI. Could you point me in the right direction?

Much appreciated,
Kevin

Any pointers would be much appreciated. :slightly_smiling_face:

Cheers,
Kevin

Example of filtering in NocoBase using a boolean field named isonduty:

  1. With the operator set to “Yes” and the filter content set to “Yes”:
    filter:{"$and":[{"isonduty":{"$isTruly":true}}]}
    Filter data with a value of true

  2. With the operator set to “Yes” and the filter content set to “No”:
    filter:{"$and":[{"isonduty":{"$isTruly":false}}]}
    Filter data with a value of false

  3. With the operator set to “No” and the filter content set to “Yes”:
    filter:{"$and":[{"isonduty":{"$isFalsy":true}}]}
    Filter data with a value of false

  4. With the operator set to “No” and the filter content set to “No”:
    filter:{"$and":[{"isonduty":{"$isFalsy":false}}]}
    Filter data with a value of true

  5. With the operator set to “is empty” and the filter box set to Yes: filter :{"$and":[{"isonduty":{"$empty":true}}]}
    Filter data with empty values

  6. With the operator set to “is empty” and the filter box set to No: filter:{"$and":[{"isonduty":{"$empty":false}}]}
    Filter data where the value is not empty

  7. With the operator set to “is not empty” and the filter box set to Yes: filter: {"$and":[{"isonduty":{"$notEmpty":true}}]}
    Filter data where the value is not empty

  8. With the operator set to “is not empty” and the filter box set to No: filter: {"$and":[{"isonduty":{"$notEmpty":false}}]}
    Filter data with empty values

The filter parameter will be passed to the third-party API as a whole. NocoBase does not support converting the filter content into data that conforms to the format of the third-party API. The third-party API needs to receive the filter content from NocoBase and then parse it.

Thanks a lot. It would be awesome to have this info in the docs if it is not there already.

Cheers,
Kevin