Add a comparison function in the TULIP table API which allows to match either the value or blank

Say I have to match two fields to find my record in a table.

Further say one of those fields are expected to be either blank or some value BUT never “”, i.e. an empty string.

Right now matching this kind of scenario requires two different types of queries to be defined and to toggle between those two types depending on what kind of scenario is expected. The “equal” match type cannot be used as it cannot deal with the logical NULL case. For this you have to use the “blank” match type. This renders some use cases either extremely difficult to pull of or impossible to accomplish.

A match type along the way of “value-if-not-empty-or-null” would do the trick.

Yes, the way table filters treat null values vs. empty strings for queries or in-app interactive tables is frequently confounding.

For example, using a multi-select or even a text input will produce different table results while null vs populated(selected) and unpopulated(deselected). You can restore the original results by clearing the associated variables, but that is not intuitive for the average user.

The original question is about a function in the API.

you can compare against blank, notBlank, empty strin, not empty string, specific value…

e.g.:

{istance}/api/v3/tables/{table_id}/records?filters=[{"field": "{field_name}", "functionType": "notEqual", "arg":""}]

will show all records where the field is not an empty string (any value or null)

{istance}/api/v3/tables/{table_id}/records?filters=[{"field": "{field_name}", "functionType": "blank"}]

will show all records where the field is null

{istance}/api/v3/tables/{table_id}/records?filters=[{"field": "{field_name}", "functionType": "notBlank"}]

will show all records where the field is not null (empty string or any value)

{istance}/api/v3/tables/{table_id}/records?filters=[{"field": "{field_name}", "functionType": "equal", "arg":"Hello World!"},{"field": "{field_name}", "functionType": "blank"}]&filterAggregator=any

will show all records where the field is null or “Hello World!”

But you are right. The treatment is not visually logic to any app developer (Text input is null, after typing and removing the content its an empty string, while setting an single select back to “select value” will make it null again…
Default for text is null or any value, but you can not make the default be an empty string…