API: How to combine two "link_row_has"?

Hi,

is it possible to combine two “link_row_has” filter in my API query, so that both values must return TRUE? I tried it with this query:

...&filter__field_123456__link_row_has=a&filter__field_123456__link_row_has=b

but the two “link_row_has” in my query are not conditional… but they should be.

Thanks in advance

Hey @Sebastian, welcome to the Baserow community!

It’s possible to combine two link_row_has filters via the query parameters in your API request. It seems that you provide an a and b as value, but this must be a numeric value representing the ID of the related row, which must be present as relationship as link row field value. It’s not yet possible to filter based on the value of the primary field in the related table.

Doing something like for the field should work:

...&filter__field_123456__link_row_has=1&filter__field_123456__link_row_has=2&filter_type=AND

Alternatively, it can also be two different fields like so:

...&filter__field_123456__link_row_has=1&filter__field_123457__link_row_has=1&filter_type=AND

In this case the 1 represents the ID of the related row that much be present in the link row value. The ID of the row can be found in the left of a row.

image

Thanks a lot bram.
In fact I wanted to check the value in addition to the id, too bad it’s not possible yet. Can you already estimate with which version this function will be available?

I can’t get back to you with an exact timeline. There are so many things that need to be done and to be honest, because it’s already possible to filter on link row values based on their id, this one has less priority. I have created an issue on the backlog (Filter on the primary value of the link row field (#874) · Issues · Bram Wiepjes / baserow · GitLab) so we won’t forgot, but I can’t make an estimation right now.