The Columns_AddToken() function in syListObj form defines the filtering tokens to use for a specific column in a list. This function is used when the values to use for the tokens can’t be automatically determined, such as for a radio group.
Columns_AddToken(list_object, column_ID, token_name, token_ID {, search_condition}{, qualifier})
• list_object – The list object composite that manages the state information for the list. This will have been passed into the procedure that creates the filtering tokens for list columns.
• column_ID – A long integer specifying the column for which the filtering token is being added. This will have been passed into the procedure that creates the filtering tokens for list columns.
• token_name – A string specifying the name that will be displayed for the token. This name will also be used in the SQL expression that is generated for the filter token.
• token_ID – A long integer specifying the unique ID of the filter token.
• search_condition – An optional string specifying the SQL search condition to use for this specific token. If supplied, this search condition will be used in a WHERE clause to retrict the list items displayed to those that meet the specified criteria. The token_name and qualifier parameters will not be used for the restriction. The search condition string must be enclosed by parentheses. The general form of the SQL restriction clause is:
WHERE fieldname LIKE search_condition
The fieldname is automatically supplied based on the column.
• qualifier – An optional integer that specifies how the % wildcard will be included in the SQL expression for the token. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
QUALIFY_NONE |
The % wildcard will not be included in the SQL expression.The SQL expression will have the form: WHERE fieldname LIKE 'token_name' |
QUALIFY_PREFIX |
The % wildcard will be added to the beginning of the SQL expression, before the token_name parameter. The SQL expression will have the form: WHERE fieldname LIKE '%token_name' |
QUALIFY_SUFFIX |
The % wildcard will be added to the end of the SQL expression, after the token_name parameter. The SQL expression will have the form: WHERE fieldname LIKE 'token_name%' |
QUALIFY_FULL |
The % wildcard will be added to both the beginning and the end of the SQL expression, surrounding the token_name parameter. The SQL expression will have the form: WHERE fieldname LIKE '%token_name%' |
A long integer containing the internal ID for the token.
In most cases, the Columns_AutoGenTokensForEnumField() can be used to create the filtering tokens for fields that can’t have their filtering tokens determined automatically.