foundset AND filter

Hello!

Is there any way to perform an AND filter with the same field on an foundset?

foundset.find()

foundset.myfield != 36
AND
foundset.myfield != my_var

foundset.search()

thanks

if(foundset.find()) {
foundset.myfield != 36
foundset.newRecord()
foundset.myfield != my_var
foundset.search()
}

foundset.newRecord() is for OR filter https://wiki.servoy.com/display/public/ … LogicalAND

Try reduced search:

foundset.find()
foundset.myfield = '!'+36
foundset.search()
foundset.find()
foundset.myfield = '!'+my_var
foundset.search(false,true)

DEK4:
foundset.newRecord() is for OR filter https://wiki.servoy.com/display/public/ … LogicalAND

ah your right,
I always mix those two up.
I now see indeed, that you are trying it on the same field!

You could also write a simple query that does that and use it in the: foundset.loadRecords(vSQL, vArgs)

You could also have a look at the query builder.
You can take the existing foundset query and add some conditions like 'column not in (val1, val2)

See https://wiki.servoy.com/display/SERV61/Query+builder

Rob

rgansevles:
You could also have a look at the query builder.
You can take the existing foundset query and add some conditions like 'column not in (val1, val2)

See https://wiki.servoy.com/display/SERV61/Query+builder

Rob

Exactly: you can use querybuilder for complex find with “where” statement.

You could also do a search for the first condition and then for the second condition with the extend parameter on