-
Notifications
You must be signed in to change notification settings - Fork 4
Get AcmaConstantValue
Ryan Newington edited this page Sep 4, 2025
·
5 revisions
Retrieves the value of a named constant from the ACMA database. Constants are global values that can be referenced in business rules and constructors throughout the ACMA configuration.
Get-AcmaConstantValue -Name <string>The name of the constant to retrieve
- Required: Yes
- Position: Named
- Pipeline input: No
- Accepts: String representing the constant name
Returns the value of the constant as an object (typically String, but can be other types)
$mailSuffix = Get-AcmaConstantValue -Name "mailSuffix"
Write-Output "Mail suffix is: $mailSuffix"$domain = Get-AcmaConstantValue -Name "defaultDomain"
$fullEmail = "$username@$domain"try {
$value = Get-AcmaConstantValue -Name "optionalConstant"
Write-Output "Constant value: $value"
} catch {
Write-Warning "Constant 'optionalConstant' does not exist"
}