# POPUP

Syntax:

Then: POPUP(row,col) f,s

Displays screen "s" of lookup file "f" at "(row,col)". If position is omitted, popup will be centered. If - (hyphen) is used for the filename, then the screen must be in the current file and no lookup is needed. A POPUP must be taken down (cleared from the screen) with the CLEARP command.

Version Ref: 4.0

Description:

Pops up a specified screen, from the lookup file, to display the record specified by the lookup. The lookup file screen will be sized for display in the popup screen by eliminating unused space to the right and bottom of the screen. The location of the upper left corner of the popup screen can be specified (optional) If no location is specified, the popup screen will be centered on the current screen.

There are two ways you can use a pop-up screen: 1) to view and update a record in the lookup file; 2) to view and update a record in the current file. In either case, a popup will not remain on the screen unless it is forced to do so. It will simply display and immediately clear too fast for the user to see. In order to keep a popup visible, you must use another filePro command. Usually, the command SHOW "@" is placed immediately after a POPUP which will keep it on the screen until the user presses <RETURN >.

Pop-up Screen From a Lookup File

Then: popup("r","c") lookup,screen

"r" (optional) is the row coordinate of the upper left corner of the popup screen

"c" (optional) is the column coordinate of the upper left corner of the popup screen

"lookup" is the assigned name of the lookup specifying the file and record to display in the popup screen

"screen" is the name or number of the screen in the lookup file to display in the popup screen.

Pop-up Screen From the Current File

Then: popup("r","c") -,screen

"r" (optional) is the row coordinate of the upper left corner of the popup screen
"c" (optional) is the column coordinate of the upper left corner of the popup screen
A dash (-), used in place of a lookup name. This will displays the current record of the current file on a screen in the current file. No LOOKUP is needed in this case.

Only one popup screen can be displayed at a time. Putting up a second popup screen will cause the first to be taken down. (See the CLEARP command below for clearing a popup screen.) If you use a popup screen in conjunction with a browse lookup, they must be taken down in the reverse order.

Pop-up Screen 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.