KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: DELETE RECORD does not affect the Current Selection
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: October 31, 2007

DELETE RECORD does not modify the current selection. For example, if I have 10 records selected and I call DELETE RECORD on all 10, "Records in selection" will still report 10 records selected. If I look at the data for these 10 "records" the fields are all blank. Because it is possible to, for example, get stuck in an infinite loop:

Repeat
DELETE RECORD([some table])
NEXT RECORD([some table])
Until(Records in selection([some table])=0)


Since DELETE RECORD does not affect the current selection, this loop never ends.

There are other commands that can produce a similar effect, but one command that does not do this is DELETE SELECTION.