Skip to main content

Constants

Literal values of specific types.

String

A constant text value.

PropertyValue
CategoryConstants
Returnsstring

Description: Creates a literal string value. Strings are enclosed in double quotes.

Example:

String("Hello World")
String("Active")
String("ORD-")

Integer

A constant whole number value.

PropertyValue
CategoryConstants
Returnsinteger

Description: Creates a literal whole number (no decimal places).

Example:

Integer(42)
Integer(0)
Integer(-100)
Integer(1000000)

Decimal

A constant decimal number value.

PropertyValue
CategoryConstants
Returnsdecimal

Description: Creates a precise decimal number. Use for financial calculations requiring exact precision.

Example:

Decimal(3.14159)
Decimal(0.08)
Decimal(99.99)
Decimal(0.001)

Float

A constant floating-point value.

PropertyValue
CategoryConstants
Returnsfloat

Description: Creates a floating-point number. Use for scientific calculations where slight imprecision is acceptable.

Example:

Float(2.71828)
Float(1.5e10)
Float(0.0001)

Money

A constant currency value.

PropertyValue
CategoryConstants
Returnsmoney

Description: Creates a currency value. Automatically handles currency formatting and precision.

Example:

Money(1500.00)
Money(0.00)
Money(99.95)
Money(1000000.00)

Boolean

A constant true/false value.

PropertyValue
CategoryConstants
Returnsboolean

Description: Creates a boolean (true or false) value.

Example:

Boolean(true)
Boolean(false)

DateTime

A constant date/time value.

PropertyValue
CategoryConstants
Returnsdate

Description: Creates a specific date and time value.

Example:

DateTime(2026-01-15)
DateTime(2026-01-15T14:30:00)
DateTime(2026-12-31T23:59:59Z)

Entity Reference

A reference to a specific entity record.

PropertyValue
CategoryConstants
ReturnsentityReference

Description: Creates a reference to a specific record in Dynamics 365. Requires the entity type and record GUID.

Example:

Entity Reference("account", "12345678-1234-1234-1234-123456789012")
Entity Reference("contact", ContactId)

Option Set

A specific option set value.

PropertyValue
CategoryConstants
ReturnsoptionSet

Description: Creates a specific choice value from an option set (choice field).

Example:

Option Set("Status", "Active")
Option Set("Priority", "High")
Option Set("AccountType", "Customer")

When to Use Constants

Explicit Type Casting: When you need to ensure a value is treated as a specific type:

// Ensure decimal precision
Multiply(Amount, Decimal(0.08))

// Ensure money type
Add(Subtotal, Money(50.00))

Default Values:

If Condition(Null(Discount), Decimal(0.00), Discount)
If Condition(Null(Status), String("Pending"), Status)

Comparisons:

Is Equal To(CustomerType, Option Set("AccountType", "VIP"))
Is Greater Than(OrderDate, DateTime(2026-01-01))

Magic Number Replacement:

// Instead of magic numbers
Multiply(Amount, 0.0825)

// Use named configuration
Multiply(Amount, Configuration Value("TaxRate"))

// Or at minimum, make the constant explicit
Multiply(Amount, Decimal(0.0825)) // 8.25% tax