6 September 2025

Using Extended Functions in Oracle BI Publisher: Choose, When, Otherwise vs. If

Advised Solutions - Business Analytics Series

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 choosewhen, 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?

  • choose acts like a switch or case block in programming languages.

  • Within choose, multiple when clauses evaluate different conditions.

  • The otherwise clause handles any case not matched by when conditions.

Syntax Example

				
					<?choose:?>
  <?when:FIELD='Value1'?>Result for Value1<?end when?>
  <?when:FIELD='Value2'?>Result for Value2<?end when?>
  <?otherwise:?>Default Result<?end otherwise?>
<?end choose?>
				
			
  • This renders Result for Value1 if FIELD equals ‘Value1’, etc., or the default result otherwise.

    How Does This Compare to if?

    The if statement is simpler but limited:

Summary

Using these techniques, you can greatly enhance the interactive power of your Oracle BI Publisher reports, providing end users with familiar, dashboard-style filtering and a seamless analytics experience.

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.