Skip to content

A Default Value expression on a text field using a function (like `count(["*"])` or `#TODAY#`) just returns the literal text typed in, instead of evaluating the function.

Answer

Text-field default values treat everything you enter as a literal string by default — to mix literal text with an evaluated function, wrap the function call in ${...} inside the string (for example, RB_${count(RebateType)}), rather than writing the function bare. Even with correct syntax, though, an aggregate like count() won't behave as expected here anyway, because a default-value expression's context is the single row currently being created, not a result set to aggregate over — for something like generating the next sequential value in a series, a Custom Field calculated via its own PL/SQL logic (referenced from the default-value expression) is the more realistic path, not a bare aggregate function in the default-value expression itself.

← Browse Platform, Aurena, and customization questions