Conditional Statements in BI Publisher: Choose, When, Otherwise vs. If
Oracle BI Publisher offers powerful extended functions to build flexible and dynamic report layouts in RTF templates. Among these, the choose, when, and otherwise elements provide a clean and readable way to handle multiple conditional branches, supplementing or replacing the more traditional if statement.
What Are Choose, When, and Otherwise?
chooseacts like a switch or case block in programming languages.Within
choose, multiplewhenclauses evaluate different conditions.The
otherwiseclause handles any case not matched bywhenconditions.
Syntax Example
Result for Value1
Result for Value2
Default Result
This renders Result for Value1 if
FIELDequals ‘Value1’, etc., or the default result otherwise.How Does This Compare to
if?The
ifstatement is simpler but limited:
Unsucessful
But it gets better…
When you utilise an if-then-else statement:
10 then 'Greater than 10'
else
if AMOUNT < 10 then 'Lower than 10'
else
'Equal to 10'
end if?>
Need some assistance?
Ready to bring clarity to customer, supplier and employee communications? With BI Publisher, we specialise in customising customer, supplier, and employee-facing documents such as invoices, purchase orders, payslips, and statements to meet your exact branding, compliance, and operational needs. From layout design to data logic enhancements, we help you deliver clear, consistent, and impactful outputs across your organization. Contact us today to discover how our expertise in BI Publisher can streamline your document processes and elevate your business communications.

