KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Retaining the highlighted selection after modifying a record
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: February 7, 2007
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

If you wish to retain your highlighted selection after viewing/editing a record and closing the Input form, the following code will help accomplish this:

COPY NAMED SELECTION(Current form table->;"orgsel")
GET HIGHLIGHTED RECORDS(Current form table->;"highlighted")
USE SET("userset") ` This reduces the selection to the highlighted records for editing...
MODIFY RECORD([Table 1])
USE NAMED SELECTION("orgsel")
CLEAR NAMED SELECTION("orgsel")
HIGHLIGHT RECORDS(Current form table->;"highlighted")
CLEAR SET("highlighted")

This code is suitable to put behind a button.