Adrian,
I honestly believe this to be a bug and hope that in the future it will be
fixed.
Below does not work:
$vc_exclude:=New collection //make a simple empty collection
$es_MySel:=ds.myTable.query("not(myField in :1)";$vc_exclude)
Here are few ways around it:
Option 1 - Check and do something different
$vc_exclude:=New collection //make a simple empty collection
If($vc_exclude.length>0)
$es_MySel:=ds.myTable.query("not(myField in :1)";$vc_exclude)// Could
have other fields as well
Else
$es_MySel:=ds.myTable.all() //Or a query without the no in
End If
Option 2 - Add a fixer value to the collection
$vc_exclude:=New collection //make a simple empty collection
If($vc_exclude.length=0)
$vc_exclude.push("")// Add a value to the collection that I would never
expect to find (of the right type)
End If
$es_MySel:=ds.myTable.query("not(myField in :1)";$vc_exclude)// now the query
will work
Option 3 - take the in away from the query
$vc_exclude:=New collection //make a simple empty collection
$es_MySel:=ds.myTable.all().minus(ds.myTable.query("myField in
:1";$vc_exclude)// now the query will work
The .all() above could be the a .query() if you are trying to query on multiple
properties.
Personally I like option 3 best.
Regards, Dougie
________________________________________________________
telekinetix Limited- J. Douglas Cryer
Phone : 01234 761759 Mobile : 07973 675 218
2nd Floor Broadway House, 4-6 The Broadway, Bedford MK40 2TE
Email : [email protected] Web : http://www.telekinetix.com
<http://www.telekinetix.com/>
________________________________________________________
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive: http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub: mailto:[email protected]
**********************************************************************