That's exactly what I assumed - if the collection is empty, you'd expect that "not in collection" would return everything, but in my experience (v17.1) it returns nothing! The workaround I have for now is to add a dummy element to the collection and that works as expected. In my case it's a collection of UUIDs from another ORDA query, so I just add a garbage UUID, but I guess even adding an empty string would do the trick?

Adrian

On 03/03/2020 08:52, Keisuke Miyako via 4D_Tech wrote:
I do not have any insider knowledge on this particular point,
but I would assume that the runtime simply ignores the instruction and return 
all entities if the collection is empty (length=0),
since the condition is the inverse of a "false" statement.

matching an empty string is a different equation.
any string of any length that matches an empty string according to unicode 
collation for the current locale rules is a match.
control characters, non characters, etc. that are not identical to "" can still be 
equivalent to "".
such entities must be removed from the resulting entity selection in this case because of 
the "NOT".
On Mar 3, 2020, at 17:26, Douglas Cryer via 4D_Tech <4d_tech@lists.4d.com> 
wrote:

Re:
Why is my query of
        NOT(IN [])
   versus
        NOT(IN [""])
producing difference results?
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.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:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to