Token | Comments |
---|---|
NAMESPACE | Specifies the namespace within which to create the class. |
The Symphony_CollectionFromFile (version 3.2) generates a collection class and the associated code to populate the collection from a data file. The created class is a populated collection of Symphony.Conductor.Content.SelectionItem. Each collection item contains a ItemValue (or ItemStringValue for alpha based collections) and Description. The ItemValue/ItemStringValue property can be data-bound to the SelectedValuePath of a ComboBox/drop-down list. The Description is the element displayed (DisplayMemeberPath for a WPF ComboBox) within the visible list.
Token | Comments |
---|---|
NAMESPACE | Specifies the namespace within which to create the class. |
Symphony tokens are applied to fields in the repository in the Long Description. They allow for additional field processing by CodeGen. You must define both the token and value, enclosed within <> brackets. For example <SYMPHONY_MAX_DISPLAY_LENGTH=100>
You can define any number of Symphony tokens in the long description. There is no separation character required.
Token | Comments |
---|---|
SELECTIONDESCRIPTION |
Specify the field within the repository structure to assign to the Description property of the Symphony.Conductor.Content.SelectionItem instance. |
SELECTIONFIELD | Specify the field within the repository structure to assign to the ItemValue (or ItemStringValue for alpha fields) property of the Symphony.Conductor.Content.SelectionItem instance. |
MODELNAMESPACE | The namespace within your application that contains the structure specific FileIO class the generated code will use to read the records from the data file. |
DATAIONAMESPACE | The namespace within your application that contains the structure specific Data Object class the generated code will use while reading data from the data file. |
RPSDATAFILES | Optionally define the repository main and text files, comma separated. |
TRIMFUNCTION | Optionally define a trim function to trim the ItemStringValue before inserting the data into the collection. If you are defining the CodeGen commands in a batch script file and using a Synergy function such as %atrim() and the trim function you must use %%atrim to ensure the correct code is generated. |
Create standard collection | |
---|---|
codegen e -r -s GROUP -t Symphony_CollectionFromFile_v3_2 -o %ROOT%ControlLibrary\Content -n ControlLibrary.Content -ut SELECTIONFIELD=group_id SELECTIONDESCRIPTION=Description MODELNAMESPACE=ControlLibrary.Data TRIMFUNCTION=%atrim |