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. If it designed for use with classes 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 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 that is 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).

asCssClassName

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 of instantiating struct types.