KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Keeping a current record while performing multiple queries
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: February 24, 2006

The 4D stack stores a current record and lasts until the method ends. The purpose of the stack is to keep the current record while performning query-related commands. Use the 4D stack commands POP RECORD and PUSH RECORD to place a current record on the stack.

Common usage of the stack commands looks like this:

PUSH RECORD ([table]) ` Places the current record on the stack

` Execute several queries with [table]

POP RECORD ([table]) ` Restores the current record from the stack

The stack can hold more than one record, where the record that was placed last will be recalled first (LIFO stack).