skip to main content
OpenEdge Development: ADM Reference
Visual Objects and Their Methods and Properties : Filtering methods for visual objects
 
Filtering methods for visual objects
This section describes the methods for SmartFilter objects. Filtering allows users to view data in more manageable groupings.
applyFilter
Procedure that applies filter criteria to the filter-target.
Location: filter.p
Parameters: None
Notes:  
*The procedure parses the dynamic filter fields and builds a list of fields, operators and values to pass to the query. The fields are only added to the list if the field or the operator is MODIFIED. (A better mechanism to identify values that need to be added to the query might become necessary). If columnQuerySelection returns any criteria for the field with an operator that is not in the list to add, it is added to a list of fields and operators to remove from the query.
*The operator for the field is:
*In a separate widget (combo-box or radio-set).
*If wild card is in the value use MATCHES or BEGINS.
*GE and LE if there is a range field with a second value.
*First blank separated entry in the field if OperatorStyle is set to inline.
*Implicit, specified by the Operator property.
blankField
Fully blanks some field and sets MODIFIED to FALSE.
Location: filter.p
Parameters:  
INPUT phField AS HANDLE
The handle of the actual filter field.
INPUT phRangeField AS HANDLE
The handle of the optional range field.
INPUT phOperator AS HANDLE
The handle of the optional operator.
Returns: LOGICAL
Note: Called by blankFields and resetFields. The special blankFillIn function ensures that fill-in widgets are fully blanked.
blankFields
Procedure that restores all filter fields to the empty, unmodified state.
Location: filter.p
Parameters: None
Notes: None
blankFillIn
Makes a fill-in appear blank by manipulating its format string.
Location: filter.p
Parameters:  
INPUT phFillIn AS HANDLE
The handle of the fill-in to be blanked.
Returns: LOGICAL
Note: Utility function called by blankFields and blankField.
createField
Create the Filter for one field.
Location: filter.p
Parameters:  
INPUT phFrame AS HANDLE
Frame handle.
INPUT pcName AS CHARACTER
Name of the column.
INPUT pcDataType AS CHARACTER
Data type to use.
INPUT pcViewAs AS CHARACTER
View-as.
INPUT pcFormat AS CHARACTER
Format.
INPUT plEnable AS LOGICAL
Enable for input.
INPUT pcTooltip AS CHARACTER
Tooltip text.
INPUT piHelpid AS INTEGER
Help ID.
INPUT pdRow AS DECIMAL
Row.
INPUT pdCol AS DECIMAL
Column.
INPUT pdHeight AS DECIMAL
Height. (If this is an editor, a height > 2 is used to set inner-lines instead of height, and the editor has word-wrap and a vertical scrollbar.)
INPUT pdWidth AS DECIMAL
Width.
Returns: HANDLE
Note: PRIVATE function
createLabel
Creates the label for the filter-field.
Location: filter.p
Parameters:  
INPUT phField AS HANDLE
The handle of the filter-field.
INPUT pcLabel AS CHARACTER
The label of the filter-field.
Returns: HANDLE
Note: PRIVATE function
createOperator
Creates the widget to use as operator or fill-in for the range option.
Location: filter.p
Parameters:  
INPUT phField AS HANDLE
The handle of the filter field.
INPUT pcType AS CHARACTER
The widget type (radio-set or combo-box; otherwise, a fill-in is created).
INPUT pcValues AS CHARACTER
List of operator values for the combo-box or radio-set.
INPUT pdCol AS DECIMAL
Column position.
INPUT pdWidth AS DECIMAL
Column width.
Returns: HANDLE
Notes: None
dataAvailable
Procedure that subscribes to the filter-target in order to make sure that the filter reflects ForeignFields and values.
Location: filter.p
Parameters:  
INPUT pcRelative AS CHARACTER
Not used.
Note: The pcRelative parameter is necessary in order not to override the ForeignField criteria in the query.
dataValue
Returns the RowObject fieldname of a database fieldname.
Location: filter.p
Parameters:  
INPUT pcColumn AS CHARACTER
INPUT pcValue AS CHARACTER
Returns: CHARACTER
Notes: None
deleteObjects
Deletes all dynamic widgets.
Location: filter.p
Parameters: None
Returns: LOGICAL
Note: Called at design-time every time the Instance Properties are changed.
disableFields
Procedure that disables fields in the ENABLED-FIELDS list.
Location: filter.p
Parameters: None
Notes: None
enableFields
Procedure that enables fields in the ENABLED-FIELDS list.
Location: filter.p
Parameters: None
Notes: None
fieldLookup
Finds the LOOKUP position of the corresponding value to the field in a CHR(1) list of fields and values.
Location: filter.p
Parameters:  
INPUT pcField AS CHARACTER
Fieldname.
INPUT pcList AS CHARACTER
CHR(1)-separated list with fieldnames and values.
Returns: INTEGER PRIVATE
Note: PRIVATE used for all defined or overridden column properties.
fieldProperty
Finds the actual value of the corresponding value to the field in a CHR(1) list of fields and values.
Location: filter.p
Parameters:  
INPUT pcList AS CHARACTER
Fieldname.
INPUT pcField AS CHARACTER
CHR(1)-separated list with fieldnames and values.
Returns: CHARACTER PRIVATE
Note: PRIVATE used for all defined or overridden column properties.
initializeObject
Procedure that filters object initialization code.
Location: filter.p
Parameters: None
Note: Dynamic widgets are created for the list of fields specified in DisplayedFields. The deleteObjects() function is called to clean up to reflect changes in the Instance Property dialog. WordIndexedFields property is never checked again. Operator objects assumes that CONTAINS is allowed if the filter field object type is EDITOR. UseContains also only works together with EDITOR fields. RANGE is not used for word-indexed fields unless UseContains is FALSE.
insertFieldProperty
Inserts or adds a fields property to the CHR(1)-separated internal property that holds fields and values.
Location: filter.p
Parameters:  
INPUT pcList AS CHARACTER
CHR(1)-separated list with fieldnames and values.
INPUT pcFields AS CHARACTER
Fieldname.
INPUT pcValue AS CHARACTER
Value of the field property.
Returns: CHARACTER PRIVATE
Notes: None
removeSpace
Procedure that backspaces, deletes, and sets the field to unmodified. Keeps it out of the selection criteria.
Location: filter.p
Parameters: None
Note: Start persistent in initializeObject. Note that filter.i has the following trigger anywhere on frame: on valueChanged > u10 > unblankFillin trigger resets format when all fields have been blanked (emptied).
resetFields
Procedure that resets all the fields to the previously applied filter values.
Location: filter.p
Parameters: None
Note: The field values and operator values are retrieved form the actual filter-targets query.
showDataMessages
Returns the name of the field (if any) from the first error message to allow the caller to use it to position the cursor.
Location: filter.p
Parameters: None
Returns: CHARACTER
Note: Invokes fetchMessages() to retrieve database update-related error messages), and displays them in an alert-box of type error. This function expects to receive back a single string from fetchMessages with one or more messages delimited by CHR(3), and within each message the message text, Fieldname (or blank) + a Tablename (or blank), delimited by CHR(4), if present.
unBlankFillin
Resets the format of a blank fill-in.
Location: filter.p
Parameters:  
INPUT phField
The handle of a field.
Returns: LOGICAL
Note: The blankFields changes the format of fill-ins to make it appear blank. This function is called as soon as the user starts editing the field; value-Changed - > "U10" triggers in filter.i makes this happen.
unBlankLogical
Procedure that resets the format of a blank fill-in of data-type LOGICAL.
Location: filter.p
Parameters:  
INPUT phField AS HANDLE
The handle of a field.
Note: The blankFields changes the format of fill-ins to make it appear blank. This procedure is defined ON ANY-PRINTABLE PERSISTENT trigger when the field is blanked.