Query filter in javascript sdk

Hello, I’m trying to figure out how to make an AND sql filter in a query in javascript in a deleteRecord.

So far I have tried : var params = ‘filter=userid%3D’+id + '&filter=batch%3D '+1;

This seem to target userid or batch in a delete call, I want userid AND batch. How do I write that ?

Thanks

if this is 1.x, try
'filter=userid%3D' + id + ' AND batch%3D' + 1

in 2.x the conditions need to be in parentheses
'filter=(userid%3D' + id + ') AND (batch%3D' + 1 + ')'

2 Likes

@Mathieu_Gauthier, the response from @formerstaff is concise and precise, and you can find more information in the docs: https://wiki.dreamfactory.com/DreamFactory/Tutorials/Querying_records_with_logical_filters

1 Like