The CreateDefaultColumn() function defined in the syListViewColObj form is used to define the columns for a list.
CreateDefaultColumn(product_ID, list_ID, sequence, field_ID, sort_order, visible, width, array_index, format_field_dict_ID, format_field_ID, filter_token_ID, sort_sequence)
• product_ID – The ID of the dictionary that contains the list for which you are creating a column.
• list_ID – An integer specifying the ID of the list for which you are creating a column.
• sequence – An integer specifying the default position of the column in the list. The value 1 specifies the first column.
• field_ID – The resource ID of the field to be used for the new column.
• sort_order – An integer specifying how the content of the column will be sorted. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
COLSORTORDER_DESCENDING |
Sort the column in descending order |
COLSORTORDER_ASCENDING |
Sort the column in ascending order |
COLSORTORDER_NONE |
Do not sort the column |
• visible – A boolean that indicates whether the column will be displayed by default. The value true indicates the column will be displayed, while false indicates it will not.
• width – An integer specifying the default width for the column in pixels.
• array_index – An integer specifying the array index of the field to be used for the column. Specify the value 0 if the field is not an array.
• format_field_dict_ID – The ID of the dictonary that contains the format field used to format the content of the column. Specify the value 0 if no format field is being used.
• format_field_ID – The resource ID of the format field used to format the content of the column. Specify the value 0 if no format field is being used.
• filter_token_ID – A long integer specifying the filter token to be applied to the column. If you haven’t defined filter tokens for the column, or don’t want a specific filter token applied to the column, specify the value 0.
• sort_sequence – This is an optional parameter that is not used.
An integer indicating whether the column was added. The value corresponds to one of the following constants:
Constant |
Description |
---|---|
OKAY |
The column was added successfully |
DUPLICATE |
The column already exists for the list |