Description
Displays tabular data and allows user selection.
Note: As of Version 4.1.3, the popup() function has been modified to sort dates and any other output converted data correctly.
Syntax
result = Popup (ownerwindow, typeoverride[, name])
Parameters
The Popup function has the following parameters:
Parameter | Description |
---|---|
ownerwindow | Contains the name of the window from which to display the specified popup, typically @WINDOW. Note: When using an MDIFrame, the ownerwindow will always be the frame regardless of the value passed to the variable. Caution: If there is no window, Popup will use the screen. In this case, there is no modality and no values will be returned to your program. |
typeoverride | An @fm-delimited record containing the specification for the Popup, or override information if name is supplied. |
name | The name of the Popup stored in the repository, or null if the entire Popup definition is being passed in typeoverride. |
A popup can be called either by
Repository("EXECUTE", popupentID, window [, typeoverride]); - OR - Popup (window, typeoverride, popupname).
Record structure
These column positions are defined in the POPUP_EQUATES insert record.
Column position | Name | Description | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | col | The X position (in pixels) of the popup relative to its calling window, ownerwindow. If set to -1, the popup will center itself in ownerwindow. If set to -2, it will center itself on the screen. The default is -1. | ||||||||||||||||||||||||||||||||||||
2 | row | The Y position (in pixels) of the popup relative to its calling window, ownerwindow. If set to -1, the popup will center itself in ownerwindow. If set to -2, it will center itself on the screen. The default is -1. | ||||||||||||||||||||||||||||||||||||
3 | width | The number of visible columns in the popup window. Scroll bars will allow the user to access all other "cells" not shown within the confines of the popup window. A -1 will cause the popup to have a width equal to the total number of columns. Default is -1. | ||||||||||||||||||||||||||||||||||||
4 | height | The number of visible rows in the popup window. Scroll bars will allow the user to access all other "cells" not shown within the confines of the popup window. A -1 will cause the popup to have a height equal to the total number of rows. Default is -1. | ||||||||||||||||||||||||||||||||||||
5 | bkcolor | Background color. An RGB @VM-delimited list is used (for example 255:@VM:0:@VM:0 is red, 0:@VM:255:@VM:0 is green). | ||||||||||||||||||||||||||||||||||||
6 | font | The font to be used in the edit table. For more information on this @svm-delimited structure, see Utility("CHOOSEFONT") and the FONT property. | ||||||||||||||||||||||||||||||||||||
7 | file | Data source information; mode specific.
| ||||||||||||||||||||||||||||||||||||
8 | display | Determines what information will be displayed; mode specific.
| ||||||||||||||||||||||||||||||||||||
9 | format | An @VM/@SVM-delimited array of format information.
| ||||||||||||||||||||||||||||||||||||
10 | mode | Specifies how the Popup gets its data.
| ||||||||||||||||||||||||||||||||||||
11 | select | Specifies how many items the user can choose.
| ||||||||||||||||||||||||||||||||||||
12 | title | Caption for the Popup. | ||||||||||||||||||||||||||||||||||||
13 | field | Used to return a field from a Native table or DataSet; used with type C or F. | ||||||||||||||||||||||||||||||||||||
14 | type | This defines the return type of the Popup.
| ||||||||||||||||||||||||||||||||||||
15 | colhdr | (Boolean) If TRUE, the column headings are visible on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
16 | rownum | (Boolean) If TRUE, the row numbers are visible on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
17 | rowbtn | (Boolean) If TRUE, the row buttons are visible on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
18 | hgrid | (Boolean) If TRUE, the horizontal grid is visible on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
19 | vgrid | (Boolean) If TRUE, the vertical grid is visible on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
20 | resize | (Boolean) If TRUE, the columns in the Popup's edit table are resizeable. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
21 | border | (Boolean) If TRUE, borders are placed on the Popup's edit table. Defaults to TRUE. | ||||||||||||||||||||||||||||||||||||
22 | btnsbelow | (Boolean) If TRUE, buttons are placed across the bottom, instead of on the right. Defaults to FALSE. | ||||||||||||||||||||||||||||||||||||
23 | search | (Boolean) If TRUE, allows searching the Popup for a user specified value. Defaults to FALSE. | ||||||||||||||||||||||||||||||||||||
24 | sort | (Boolean) If TRUE, allows column sorting. Defaults to FALSE. Note: Right justified columns are sorted right-justified, all others are sorted left-justified. | ||||||||||||||||||||||||||||||||||||
25 | lock | The number of columns set to "scroll lock." Defaults to 0. | ||||||||||||||||||||||||||||||||||||
26 | user-defined | This column reserved for user-defined information; it is not set or altered by Popup Designer. | ||||||||||||||||||||||||||||||||||||
27 | subfile | Secondary data source information; mode specific.
| ||||||||||||||||||||||||||||||||||||
28 | initselect | @VM list of row numbers to initially select when the Popup is executed. | ||||||||||||||||||||||||||||||||||||
29 | showmissing | (Boolean) If TRUE, show the phrase 'Record Missing' in columns. | ||||||||||||||||||||||||||||||||||||
30 | (Boolean) If TRUE, show the print button. | |||||||||||||||||||||||||||||||||||||
31 | showGauge | (Boolean) If TRUE, display a gas gauge message when the system is populating the popup. | ||||||||||||||||||||||||||||||||||||
32 | captureEsc | (Boolean) If TRUE, return CHAR(27) when the Cancel button in the Popup window is clicked. |
Notes
For a Popup with mode D, when the Popup is executed it determines what data source to use in this order.
1. If a DataSet handle is passed in <7, 2> (file), then that DataSet is used.
2. If a Connection Object handle is passed in <27, 2> (subfile), then the DataSet is created and executed using that handle.
3. If a DataSource name is passed in <27, 1> (subfile), then a connection handle is created for that DataSource name using XOInstance and that handle is used to create and execute the DataSet.
Otherwise, the DataSource name specified in the DataSet Designer is used to create a connection which in turn is used to create and execute the DataSet passed in <7, 1> (File).
See also
POPUP_EQUATES (Insert record).