Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: johnpelzIs there a way turn off the parameter "pre-validation" in a node using a BRAINScript expression?
For example, we have a paramter that we want to be optional in a sort node for kind of dynamic sort approach (additional sort keys); however, the following will cause a validation error if the parameter is left blank:
if ("{{^SORT_KEYS^}}".trim().len() > 0) and "{{^SORT_KEYS^}}".isNotNull() then
AMOUNT
else
list(AMOUNT, {{^SORT_KEYS^}})
Any ideas? Node is posted below:
node:Sort
bretype:core::Sort
editor:sortkey=4834520d63f712a4
input:@40fd2c743ebf4304/=Head.42fbf39e14aa2417
output:@40fd2c746a2a3b47/=
prop:CompareOrderExpr=<<EOX
if ("{{^SORT_KEY^}}".trim().len() > 0) and "{{^SORT_KEY^}}".isNotNull() then
AMOUNT
else
AddrString
EOX
prop:SORT_KEY=A
editor:XY=760,140
editor:propdef=SORT_KEY|string|1||None
end:Sort