skip to main content
OpenEdge Development: ADM Reference
Field Objects and Their Methods and Properties : Methods for select field objects
 
Methods for select field objects
You use the select methods for SmartSelect objects. These objects represent a self-populating selection list.
anyKey
Procedure that runs persistently on any key of the selection fill-in.
Used only with the view-as browse option. The persistent trigger that calls this is defined if DefineAnyKeyTrigger is TRUE. The user could define an override of this in selectcustom.p if more sophisticated interactions with the data-source are required without starting the browse. For example:
 
listif last-event:key-function = "cursor-down"
then run fetchNext in getDataSource().
Location: select.p
Parameters: None
Example:  
 
listif last-event:key-function = "cursor-down"
then run fetchNext in getDataSource().
Notes: None
browseHandler
Procedure that sets the properties in the newly started Browse widget.
Location: select.p
Parameters:  
INPUT phBrowseObject AS HANDLE
Handle of the Browse.
Note: Called by initializeBrowse before the Browse has been linked or initialized. Override this function to set/override properties for the Browse.
buildList
Builds the list of fields to display and the corresponding SCREEN-VALUE for the widget.
Location: select.p
Parameters: None
Returns: CHARACTER PRIVATE
Note: Loops through all the rows in the data-source, building the list.
createLabel
Creates the label of the selection. The label is added to the parent frame.
Location: select.p
Parameters:  
INPUT pcLabel AS CHARACTER
Returns: HANDLE
Notes:  
*This function is separated in order to create the label in design-mode.
*Instance properties:
*Shows label when label is set from the data-source. The dialog knows the Data-Source, but this super procedure cannot find it because the link is not implemented.
*EndMove. Moves label accordingly.
dataAvailable
Procedure that defines logic to receive data from the data-source when the view-as is a fill-in.
Location: select.p
Parameters:  
INPUT pcMode AS CHARACTER
Not used.
Note: Use a Modify property to avoid marking the value as changed when setdataValue calls fetchRowident in the data-source in order to display the record. If Modify is TRUE, check the source-procedure because this identifies whether this is called directly from value-changed, or indirectly from default-action.
destroyObject
Local override of destroyObject, this procedure deletes created widgets.
Location: select.p
Parameters: None
Notes: None
destroySelection
Cleans up all dynamically created objects.
Location: select.p
Parameters: None
Returns: LOGICAL PRIVATE
Notes: None
disableButton
Procedure that disables a SmartSelect’s controls. Used to prevent finding and perhaps unintentionally changing a second record when an update is pending.
Location: select.p
Parameters: None
Notes: None
disableField
Procedure that disables SmartSelection component.
Location: select.p
Parameters: None
Note: The SmartDataViewer container calls this procedure if a widget of type PROCEDURE is encountered in disableFields.
disable_UI
Procedure that disables the user interface parameters.
Location: select.p
Parameters: None
Note: Clean up the user interface by deleting dynamic widgets that have been created or by hiding frames, as appropriate. This procedure is usually called when ready to clean up after running.
enableButton
Procedure that undoes the action of disableButton.
Location: select.p
Parameters: None
Notes: None
enableField
Procedure that enables SmartSelection component.
Location: select.p
Parameters: None
Note: The SmartDataViewer Container calls this procedure if a widget of type PROCEDURE is encountered in enableFields.
endMove
In design mode, this procedure moves the label when the field is moved.
Location: select.p
Parameters: None
Note: Defined as PERSISTENT on END-MOVE of the frame of the widget.
enterSelect
When a trigger fires on entry of SmartSelect field, this procedure copies the screen value to the object. As a result, the lookup can be avoided if the new value actually exists as a unique record.
Location: select.p
Parameters: None
Notes: None
formattedValue
Returns the formatted value of a passed value according to the SmartSelects format.
Location: select.p
Parameters:  
INPUT pcValue AS CHARACTER
The value that needs to be formatted.
Returns: CHARACTER
Note: Used internally in order to ensure that unformatted data can be applied to screen-value (setDataValue), or used as a lookup in list-item-pairs in (getDisplayValue).
hideObject
Procedure that overrides to ensure that the label is hidden.
Location: select.p
Parameters: None
Note: For sizing reasons, the label is not really a part of the object, but added as a text widget to the parent frame.
initializeBrowse
Code to initialize a browse. This procedure starts a browse to show the Data-source data. The browse procedure is specified in the BrowseProcedure property and defaults to the dynamic SmartDataBrowser. A dynamic SmartWindow (BrowseContainer) is started first and the browse procedure is started with the containers constructObject.
Location: select.p
Parameters: None
Notes: None
initializeObject
Procedure that overrides initializeObject in order to subscribe to the ChangedEvent, if defined, and to initializeSelection.
Location: select.p
Parameters: None
Notes: None
initializeSelection
Unless the view-as is specified to be a browse, this procedure creates a selection widget and populates it with data.
Location: select.p
Parameters: None
Notes: None
leaveSelect
This procedure fires on leave of a SmartSelect field and determines whether the lookup can be avoided because the new value exists as a unique record.
Location: select.p
Parameters:  
Note: This works only if the displayed field is in the first buffer of the linked SDO.
queryOpened
Procedure that subscribes to dataSource parameters.
Location: select.p
Parameters: None
Note: SmartSelect needs to know that the query has changed, since this cannot be detected through an ordinary publish with dataAvailable.
refreshObject
Procedure that refreshes the data in a SmartSelect.
Location: select.p
Parameters: None
Note: openQuery in the datasource publishes “queryOpened” which is Subscribed to run this (in initializeSelection). Also defined as PERSISTENT trigger on F5 of the selection widget.
repositionDataSource
Repositions the current dataSource according to the key field. Conditionally called from setDataValue() and valueChanged().
Location: select.p
Parameters:  
INPUT pcValue AS CHARACTER
Returns: LOGICAL
Notes: None
resizeObject
Procedure that resizes the SmartSelect.
Location: select.p
Parameters:  
INPUT pidHeight AS DECIMAL
New height of component.
INPUT pidWidth AS DECIMAL
New width of component.
Note: The procedure deletes the current widget, resizes the frame, and re-creates the widget.
rowSelected
Procedure that publishes from the browser when a row is selected.
Location: select.p
Parameters: None
Note: The browser is selected on default action and exits (if CancelrowObExit = FALSE). The subscripting is done in browseHandler.
valueChanged
Procedure used to notify the SmartDataViewer container that this value has changed.
Location: select.p
Parameters: None
Note: Defined as a PERSISTENT value-changed trigger in the dynamic-widget. The code currently duplicates the logic that is defined in the U10 trigger in the SmartDataViewer when the view-as is browse, because this code’s check of FOCUS is wrong when the actual change is caused by a user event in the browser.
viewObject
Procedure that makes sure the label is viewed.
Location: select.p
Parameters: None
Notes: None