tSelectionItem
See Also: Declaring Variables, Struct, Move, SerializeRowId
Purpose
tSelectionItem is a structured type used to store information about a selected item. It is most often used to represent selections in a tSelectionItem array. It is designed for use with classes such as cSelectionSource, cTagsForm, and cWebTagsForm.
See cSelectionSource for examples of how this is used.
Type Declaration
Struct tSelectionItem
String sRowId
String[] aValues
#IFDEF IS$WEBAPP
String sCssClassName
#ENDIF
End_Struct
Struct Members
sRowId
This must be a unique ID that represents the row. Most often, this will be a serialized version of the RowId (e.g., Move (SerializeRowId(RowId(Customer.File_Number)) to Suggestion.sRowId), but it can be any unique string value. Each item in a tSelectionItem array must have a unique sRowId value. In non-data-aware classes or tags and selections not yet saved to a database, this struct member will be blank.
aValues
This is an array of string values that represent the data displayed for a suggestion row. Normally, there will only be a single array value, which is the value to be displayed (e.g., Move sValue to Suggestion.aValues[0]). Additional values are allowed. Validation table suggestion lists use two values: a code and a description.
sCssClassName
This is an optional struct member that allows specifying a specific or custom CSS class for this selection item.
Syntax
Use tSelectionItem.pkg
tSelectionItem {variableName}
Declaring Variables
To declare tSelectionItem variables, use the name of the type (tSelectionItem) followed by the variable name.
tSelectionItem MySuggestion
See struct variables for more details on instantiating struct types.