KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: A utility method to reduce the selection of all tables
PRODUCT: 4D | VERSION: 13.1 | PLATFORM: Mac & Win
Published On: September 12, 2012

The following utility method, UTIL_ReduceAllSelections, reduces the selection of all tables in the database to 0. This is very useful for reducing the consumption of memory:

C_LONGINT($a;$lastTable)
C_POINTER($tablePtr)
$lastTable:=Get last table number
For ($a;1;$lastTable)
   If (Is table number valid($a))
      $tablePtr:=Table($a)
      REDUCE SELECTION($tablePtr->;0)
   End if
End for


If the above listed method is saved as a Project method named UTIL_ReduceAllSelections than it can be used like so:

UTIL_ReduceAllSelections