# POPUP UPDATE

Syntax:

Then: POPUP(row,col) UPDATE f,s,m

Displays screen "s" of lookup file "f" at "(row,col)" and puts the user into update mode on this screen, positioning the cursor in field "m". If (row,col) is omitted, the popup will be centered. If - (dash) is used for the filename, then the screen must be in the current file and no lookup is needed. If field is omitted, the cursor is placed in the first field on the popup screen. A POPUP UPDATE will stay up until taken down by a CLEARP command, even after the user has pressed the BREAK or SAVE key to leave the POPUP UPDATE.

Version Ref: 4.0

IMPORTANT: The special benefit of POPUP UPDATE is that the contents of the POPUP screen will be saved to the looked-up record (or to the current record if - is used as the filename). Thus, if you look up a particular customer record and POPUP UPDATE a screen from that file and the user makes changes to the fields on this screen, these changes will automatically be written to that record in the customer file when the user presses the SAVE key. If the user presses the BREAK key, the looked-up record will not be changed.

System-maintained field, @SN, will contain the name of the popup screen

HINT: The following benefit applies to using POPUP UPDATE with the current file (dash): When-processing (@WEF, @WLF, @WHP, and @WBL, etc.) on this specific type of POPUP UPDATE can be performed by doing it from dummy fields placed on this screen. This is an extremely valuable processing construct, since processing is not normally allowed while on a POPUP UPDATE screen.

Pop-up Screens and Passwords

Even though a password is assigned to a screen when defining a screen, since its decided at design time when to use a POPUP screen, the screen password is ignored. Use INPUTPW or other means to control access to POPUP screens when included in your lookups.

CLEARP

Syntax:

Then: CLEARP

Examples:

Description:

This command removes a popup and cleans up the screen. It is a good idea to always use this command after a popup.