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:

ParameterDescription
ownerwindowContains 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.

typeoverrideAn @fm-delimited record containing the specification for the Popup, or override information if name is supplied.
nameThe 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 positionNameDescription
1colThe 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.
2rowThe 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.
3widthThe 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.
4heightThe 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.
5bkcolorBackground color. An RGB @VM-delimited list is used (for example 255:@VM:0:@VM:0 is red, 0:@VM:255:@VM:0 is green).
6fontThe font to be used in the edit table. For more information on this @svm-delimited structure, see Utility("CHOOSEFONT") and the FONT property.
7file

Data source information; mode specific.

modeValueDescription
C, F, OpenInsight table name.
K, R,  
T  
D<7, 1>DataSet name.
 <7, 2>DataSet handle (allows an existing DataSet to be used as the data source for the Popup).
N<7, 1>Database name.
 <7, 2>"NOTESFORM" or "NOTESVIEW."
 <7, 3>@SVM-delimited list of forms/views.
 <7, 4>For the form or view specified by <7,3,i>, an @TM-delimited list fields or columns is specified in <7,4,i>.
L not applicable
8display

Determines what information will be displayed; mode specific.

modeValueDescription
C Cursor number 0-9 (0 is default).
D<8, 1>@SVM-delimited list of argument values.
  @SVM-delimited list of corresponding argument names.
 <8, 2>If names are not supplied then argument numbers are assumed by position of argument values.
F<8, 1>OpenInsight Table Key.
 <8, 2>Field Number.
K@VM-delimited list of OpenInsight Table Keys. 
L@VM/@SVM-delimited array of literal data. 
N@VM- (as opposed to @FM) delimited SearchInfo record. (See "OpenNote() function" in Programmer's Reference Manual for details); - OR - Select script; for example "Select @all"; - OR - "USE" ViewName; for example "Use Contacts_by_Company". 
ROpenInsight Table Key. 
TRlist selection and sorting criteria; for example "WITH COST < 100.00 BY COST". 
9format

An @VM/@SVM-delimited array of format information.

ParameterDescription
FieldColumn name or number.
WidthWidth of column (of characters).
text justificationL, R, or C.
heading justificationL, R, or C
OconvOutput conversion pattern.
HeadingHeading text of column.
10mode

Specifies how the Popup gets its data.

modeDescription
CThe popup row corresponds to a record retrieved from a Native Tables cursor.
DThe popup row corresponds to a DataSet row.
FThe popup row corresponds to a value in a multi-valued field in an Native Tables record.
KThe popup row corresponds to a Native Tables record identified by the passed Key.
LThe popup row corresponds to an @SVM-delimited array element of display.
NThe popup row corresponds to a Lotus Notes document.
RThe popup row corresponds to a field from the specified table.
TThe popup row corresponds to a Native Tables record selected using Rlist.
11select

Specifies how many items the user can choose.

ValueDescription
0No selection.
1One selection (default).
2Multiple selections.
3Ordered multiple selections.
12titleCaption for the Popup.
13fieldUsed to return a field from a Native table or DataSet; used with type C or F.
14type

This defines the return type of the Popup.

ParameterDescription
CColumn. Data from column field are returned (@VM-delimited list if multiple selections allowed). field specifies a column name (from the dictionary) or a number (as a column number in the row). Use C when you want to return data that is not displayed in the popup, but is part of each row.
EEntire row. Entire row is returned. (Multiple rows are delimited by @FM.).
FPopup field. Data from Popup column field are returned (@VM-delimited list if multiple selections allowed). field specifies a column number from the actual displayed data; i.e. column 1 is the first column in the Popup.
KRow key. row key(s) of selected data (@VM-delimited list if multiple selections allowed).
 The Notes document ID is returned if the mode is N.
PRow position. Row numbers of selected data are returned (@VM-delimited list if multiple selections allowed).
RRead only. No value is returned.
15colhdr(Boolean) If TRUE, the column headings are visible on the Popup's edit table. Defaults to TRUE.
16rownum(Boolean) If TRUE, the row numbers are visible on the Popup's edit table. Defaults to TRUE.
17rowbtn(Boolean) If TRUE, the row buttons are visible on the Popup's edit table. Defaults to TRUE.
18hgrid(Boolean) If TRUE, the horizontal grid is visible on the Popup's edit table. Defaults to TRUE.
19vgrid(Boolean) If TRUE, the vertical grid is visible on the Popup's edit table. Defaults to TRUE.
20resize(Boolean) If TRUE, the columns in the Popup's edit table are resizeable. Defaults to TRUE.
21border(Boolean) If TRUE, borders are placed on the Popup's edit table. Defaults to TRUE.
22btnsbelow(Boolean) If TRUE, buttons are placed across the bottom, instead of on the right. Defaults to FALSE.
23search(Boolean) If TRUE, allows searching the Popup for a user specified value. Defaults to FALSE.
24sort(Boolean) If TRUE, allows column sorting. Defaults to FALSE.

Note: Right justified columns are sorted right-justified, all others are sorted left-justified.

25lockThe number of columns set to "scroll lock." Defaults to 0.
26user-definedThis column reserved for user-defined information; it is not set or altered by Popup Designer.
27subfile

Secondary data source information; mode specific.

modeValueDescription
D<27, 1>DataSource name.
 <27, 2>Connection Object handle (Supplied at runtime).
28initselect@VM list of row numbers to initially select when the Popup is executed.
29showmissing(Boolean) If TRUE, show the phrase 'Record Missing' in columns.
30print(Boolean) If TRUE, show the print button.
31showGauge(Boolean) If TRUE, display a gas gauge message when the system is populating the popup.
32captureEsc(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).

  • No labels