Value Class - Constant
- What is the Constant option?
- How do I use variables in the Field Value field?
- How do I convert a Constant value?
- How do I format a Constant value?
- How do I use mapping filters in different repository types?
Tip
Summary: The Constant option can be used to directly take the value of the Field Value field as text. Variables can be used, and the value can be converted and formatted using the Conversion Code field. Values should be entered in English format or XML format. Mapping filters are technically carried out in the source code for Tables/Record Pools, XML Nodes and JSON Tokens.
With the Constant option, the value of the Field Value field is directly taken as text. Variables can be used, like Result: [SUM] [CURRENCY]. For more information, see Mapping Variables. After resolving the variables, the value can be converted via the Conversion Code field and then formatted.
If a (text) Constant is converted into another data type (for example, decimal), the correct spelling (Format Property) must be used. Otherwise, the Constant must be prepared by a Conversion Code. The values should be entered in English format, or XML format (for example, true for a boolean field). Microsoft Dynamics 365 Business Central fields are automatically tested and, if necessary, converted. Option values of Tables are represented by numerical values (0, 1, 2, …) and the related text values are displayed in the Field Value Caption field.
How to use mapping filters in different repository types
Mapping filters are technically carried out in the source code.
Table / Record Pool
<Field>.SetRange(<Value>)
XML Node
XPath += "[and] <Node>='<Value>'"
XPath += "[and] <Node>@<Attribute>='<Value>'"
JSON Token
<Property> === <Value>
Feedback
Submit feedback for this page .