Inserts a string indicating the Synergy .NET equivalent data type of a literal key segment of a foreign key that is referenced in the "from key" side of a relationship. Literal key segments defined in repository don't have a data type, only a value, so this token derives the data type by looking at the matching field segment in the relations associated "to key".
For example, consider a relationship involving the following two structures and keys:
Structure A Structure B
FROM Foreign key TO Access key
Segment 1, literal 0 Field rectype (D1)
Segment 2, field customer (D6) Field customer (D6)
In order to determine a data type for the literal segment in structure A, the code looks at the matching field segment in structure B. The field is a D1, so it will be represented as an int.
Usage
<LITERAL_SEGMENT_SNTYPE>
IMPORTANT NOTE
This token can ONLY be used in a relation FROM key segment loop, and further ONLY when processing a LITERAL segment, which can only exist in a FOREIGN key. The <IF SEG_TYPE_LITERAL> expression should be used to ensure this is the case. For example:
<RELATION_LOOP>
<FROM_KEY_SEGMENT_LOOP>
<IF SEG_TYPE_LITERAL>
<LITERAL_SEGMENT_CSTYPE>
</IF SEG_TYPE_LITERAL>
</FROM_KEY_SEGMENT_LOOP>
</RELATION_LOOP>
Possible values
•boolean
•byte
•double
•float
•int
•long
•decimal
•DateTime
•Nullable<DateTime>
•sbyte
•short
•string
•uint
•ulong
•ushort
Alternate forms
None
See also
•Other relation key segment loop expansion tokens
Copyright © 2021 Synergex International, Inc.