"The filter contains is not compatible with field type formula": blue or red pill?

Hi all,
I’m using the docker version of baserow 1.20.2 freshly downloaded on Sept 26th.

I’m able to use the contains function on a formula field and it works great !
for example ‘api/database/rows/table/202578/?filter__field_1391747__contains=XXX’

BUT I’ve just tried the same on baserow.io and I get error : The filter contains is not compatible with field type formula.

Which version is in advance ? :slight_smile:
I mean: will this feature be available in a near future on baserow. io ? or the opposite ?

By the way, thanks to great documentation and configuration, it was easy to setup with my own S3/Postgres :slight_smile:

Hello @Chris, welcome to the Baserow community :wave:

This is because of how the contains function works. It returns ‘true’ if the search string is present in the value. To filter by this field, you can use ‘is selected’ to only display the rows that are true. This way, they will still be filtered by ‘contains’. Is it what you’re looking for?

Thanks for the answer. It gave me some tips to find the solution.
Initially, some formulas were working, others no :slight_smile:
It’s a “known problem” when using a “link to table” field (already seen in other posts)

Suppose you write something like : field(‘foo’) + field(‘bar’) in a formula where ‘bar’ is a link to table with 1-1 cardinality. On display, everything is fine. But when using API, it complains with The filter contains is not compatible with field type formula.
This is due to field(‘bar’) which I think returns an ARRAY, not compatible with contains.
So rewriting the formula with field(‘foo’) + join(field(‘bar’),’’) resolve the error :slight_smile: !
Too bad that the UI and API don’t have the same behavior…
Anyway, everything works and thanks all for your answers where I’ve found all the elements to resolve the problem.

Thanks @Chris. I will also check with the dev team to see if there is anything we can do or plan to do about it.

I’m glad everything works for you now. :slightly_smiling_face: