Fetch query with filter expression field not null

#1

Hi,

I’d like to filter data from a c3type using the expression myFiled not null as follows :slight_smile:
c3Grid(MyC3Type.fetch({filter:“myFiled != null”,limit:10}))
But i got this error :
“wrapped RuntimeException: Query with keyword null in expression “meta.*** == *** && ((startsWith(typeIdent, ‘ASSET:**:****’)) && (myField != null))” is not yet supported; error at1:9”

Anybody has an idea how to filter on non null values ?

Thanks in advance

0 Likes

#2

use the exists expression engine function: c3ShowFunc(ExpressionEngineFunction, 'exists')
in your case the filter becomes filter:"exists(myFiled)"

2 Likes

#3

Thank you Bachir :ok_hand:

0 Likes