skip to main content
OpenEdge Development: ADM Reference
Field Objects and Their Methods and Properties : Methods for combo field objects
 
Methods for combo field objects
This section lists and describes the methods for SmartCombo field objects.
anyKey
Procedure used to trap a keypress and scroll to the first entry beginning with that key character. Add your code to complete.
Location: combo.p
Parameters: None
Note: Use LAST-EVENT:FUNCTION for testing keypress.
createLabel
Creates the label for the Combo Box.
Location: combo.p
Parameters:  
INPUT pcLabel AS CHARACTER
The label string.
Returns: HANDLE
Note: This function is separated in order to be able to create the label in design-mode. The label is defined in the parent Frame.
destroyCombo
Cleans up all dynamically created objects.
Location: combo.p
Parameters: None
Returns: LOGICAL
Notes: None
destroyObject
Local override of destroyObject. This procedure deletes dynamic Combo Box objects by calling destroyCombo.
Location: combo.p
Parameters: None
Notes: None
disableField
Procedure that sets SENSITIVE and FieldEnabled to FALSE.
Location: combo.p
Parameters: None
Note: The SmartDataViewer container calls this procedure if a widget of type PROCEDURE is encountered in disableFields.
disable_UI
Procedure that purges THIS-PROCEDURE, if persistent.
Location: combo.p
Parameters: None
Note: Clean up the user-interface. This routine is usually called after execution completes.
displayCombo
This procedure is published from the SmartViewer containing the SmartDataField to populate the Combo with the evaluated query data, if the query was successful. It is published from displayFields in the viewer. The queries are initially built in ComboQuery.
Location: combo.p
Parameters:  
INPUT TABLE FOR ttDCombo
Note: This is designed to allow all combo queries to be built at the cost of only a single appserver call.
enableField
Procedure that enables a Combo field. The SmartDataViewer calls this procedure if a widget of type PROCEDURE is encountered in enableFields.
Location: combo.p
Parameters: None
Notes: None
enterCombo
This procedure fires a trigger on entry into a Combo field to store the current screen value of the displayed field.
Location: combo.p
Parameters: None
Note: The typical case is that the displayed field are not the same as the keyfield. In that case, logic can be fired when the displayed field is changed in the leave trigger to see if the new value keyed in actually exists as a unique record, and if so, avoid having to use the combo.
endMove
This procedure moves the label whenever the field is moved in design mode.
Location: combo.p
Parameters: None
Note: Defined as PERSISTENT on END-MOVE of the frame of the widget.
hideObject
This procedure gets the value of LabelHandle, hides the label, and then calls RUN SUPER.
Location: combo.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.
initializeCombo
Procedure that runs as part of initializeObject to set up the combo.
Location: combo.p
Parameters: None
Note: Defaults keyfield to actual field if not defined. Defaults displayed field to keyfield if not defined. Assumes a data type of decimal for keyfield and character for displayed field if different.
insertExpression
Inserts an expression into ONE buffer’s WHERE clause.
Location: combo.p
Parameters:  
INPUT pcWhere AS CHARACTER
A complete WHERE clause with or without the FOR keyword, and without leading or trailing commas.
INPUT pcExpression AS CHARACTER
New expression/OF phrase to replace the existing OF phrase.
INPUT pcAndOr AS CHARACTER
Whether to AND (default) or OR the new expression.
Returns: CHARACTER PRIVATE
Notes:  
*The new expression is embedded in parentheses, but no parentheses are placed around the existing expression.
*Lock keywords must be unabbreviated or without –LOCK (that is. SHARE or EXCLUSIVE).
*Any keyword in comments might cause problems.
leaveCombo
This procedure fires a trigger on leave of combo field. It stores the current screen value in the combo.
Location: combo.p
Parameters: None
Notes: None
newQueryString
Returns a new query string to the passed query. The tables in the passed query must match getQueryTables(). Adds column / value pairs to the corresponding buffer’s where-clause. Each buffer’s expression is always embedded in parenthesis.
Location: combo.p
Parameters:  
INPUT pcColumns AS CHARACTER
Comma-separated list of column names of the form table.fieldname.
INPUT pcValues AS CHARACTER
Chr(1)-separated list of corresponding values.
INPUT pcDataTypes AS CHARACTER
Comma-separated list of corresponding data types.
INPUT pcOperators AS CHARACTER
Comma-separated list of corresponding operators. If blank, the operator is EQ for all columns. Alternative string operators can be separated with a slash, for example: EQ/BEGINS.
INPUT pcQueryString AS CHARACTER
A complete query string. This must be qualified correctly and match the queried tables. If the Unknown value (?), the base query is presumed.
INPUT pcAndOr AS CHARACTER
The operator that defines how the new clause is appended, for each buffer, to the query in pcQueryString. Valid values are AND and OR.
Returns: CHARACTER
Note: This was taken from query.p but changed for Combos to work without an SDO.
newWhereClause
Inserts a new expression to query’s prepare string for a specified buffer.
Location: combo.p
Parameters:  
INPUT pcBuffer AS CHARACTER
The buffer.
INPUT pcExpression AS CHARACTER
The new expression.
INPUT pcWhere AS CHARACTER
The current query-prepare string.
INPUT pcAndOr AS CHARACTER
The operator used to relate the new expression to the existing query. Valid values are AND (default) and OR.
Returns: CHARACTER
Note: This is a utility function that does not use properties.
refreshChildDependancies
Procedure that refreshes any children of the Combo identified in the argument.
Location: combo.p
Parameters:  
INPUT pcFieldName AS CHARACTER
The possible parent.
Notes: None
refreshCombo
This procedure runs displayCombo in TARGET-PROCEDURE. This is usually triggered from a value-changed event of a parent combo.
Location: combo.p
Parameters: None
Notes: None
resizeObject
This procedure resizes the Combo by deleting the widget, resizing the frame, and recreating the widget in the new size.
Location: combo.p
Parameters:  
INPUT pidHeight AS DECIMAL
New height of the widget.
INPUT pidWidth AS DECIMAL
New width of the widget.
Notes: None
returnParentFieldValues
This procedure loops through all field handles.
Location: combo.p
Parameters:  
OUTPUT pcNewQuery AS CHARACTER
Notes: None
showQuery
Procedure that displays the current query of the combo.
Location: combo.p
Parameters: None
Notes: None
valueChanged
Procedure used to notify the SmartDataViewer that the Combo’s value has changed. Publishes populateChildCombo and comboValueChanged.
Location: combo.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 because this code’s check of FOCUS is wrong when the actual change is caused by a user event in the browser.
whereClauseBuffer
Returns the buffername of a WHERE clause expression. This function avoids problems with leading or double blanks in WHERE clauses.
Location: combo.p
Parameters:  
INPUT pcWhere AS CHARACTER
Complete where clause for ONE table with or without the FOR keyword. The buffer name must be the second token in the clause, not counting any FOR. For example: "EACH order OF Customer", but "FOR EACH order".
Returns: CHARACTER PRIVATE
Note: PRIVATE, used internally in query.p only.
viewObject
Procedure that turns off HIDDEN to make the label visible.
Location: combo.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.