Problem combining multiple anyof filters with ~and~ in where clause on multiselect fields

I’m encountering a problem when using the where clause to filter on multiple multiselect fields in NocoDB. Can someone help, please?

Using a single anyof condition returns results as expected. For example:
where=(Genre,anyof,Cyberpunk), or
where=(Type,anyof,Instrumental).

Both of these return correct records when used individually.

Combining both conditions using ~and~ results in no records returned, even though matching rows definitely exist: where=(Genre,anyof,Cyberpunk)~and~(Type,anyof,Instrumental). This structure follows the format from the documentation: (field1,operator,value1)~and~(field2,operator,value2)

This is my full NocoDB request: …/records?sort=Title&offset=0&limit=3&fields=Title%2CGenre%2CType%2CScene%2CMood%2CLoopability%2CTempo%2CMusic+Genre%2CInstruments%2CLocation%2CYoutube+Link&where=%28Type%2Canyof%2CInstrumental%29%7Eand%7E%28Genre%2Canyof%2CCyberpunk%29

Hello, the syntax should be ~and, not ~and~, maybe you can try that. So it should be where=(Genre,anyof,Cyberpunk)~and(Type,anyof,Instrumental)

If it’s still not working:

  • try with ~or
  • please share the response message and status code
2 Likes

Oh… Thank you very much. It solved the problem.