Denver, Colorado

New extended support for Template Directives in Oracle APEX

In Oracle APEX 22.2 new support for Template Directives is now available for both Classic and Interactive Reports. 

Template Directives enable the ability to apply client-side directives to control the formatting of your data returned from SQL.  

In the past, when creating an interactive report, developers had no options when it came to formatting special columns, such as multiple values returned for each SQL query line.  Now with new Template directives, you can place the formatting in the APEX tool, leaving your SQL queries clean from client-side formatting.

How about an example?

Let’s say a developer needs to display data in an interactive report that contains a column with multiple values. 

In the past, developers could only display the data as it was presented in the SQL statement, unless they introduced client-facing code, like HTML items like bulleted lists, or tables, etc, within the SQL query.

Now with APEX 22.2, developers can place any client-facing formatting code outside the SQL statement, making the statement much cleaner to read and maintain.

Lets display data from this table:  EBA_DEMO_APPR_APPROVERS.

As you can see the raw data in the JOB_CODES field has a colon-separated list of job codes for each user.

To display data in this table in a report, we have created an APEX Interactive report using the table as the Source.

When displayed without formatting the Job Codes field is shown as it is returned in the SQL statement in an interactive report:

Now, after adding a template directive in the Column Formatting section of the IR, within the HTML Expression field for JOB_CODES, a bulleted list can be displayed

HTML Expression code:

<ul class="tags">{loop ":" JOB_CODES/}

  <li class="tag-item">&APEX$ITEM.</li>


After adding the template directive to the column, the following formatted data can now be displayed

So there you have it.  APEX developers no longer need to include client-side formatting logic within SQL queries in interactive reports.  

Better yet, the same new Template Directive functionality is now available for Classic reports in APEX 22.2.

What is Oracle APEX?

Oracle APEX is a powerful and widely used low-code development tool that is popular among developers and businesses alike because of its ease of use, robust functionality, and scalability, ability to integrate with other Oracle products, and large community support.

Choose oAppsNet as your Oracle APEX partner

Reach out to oAppsNet today to see how we can help you maximize your investment with Oracle.  

Why us?

Oracle expertise: oAppsNet has extensive expertise in Oracle technologies, including Oracle E-Business Suite, Oracle Cloud Applications, and Oracle APEX, among others. This means that they can provide valuable insights and advice on how to best leverage these technologies to meet your business needs.

Customization capabilities: oAppsNet has a strong track record of customizing Oracle solutions to meet unique business requirements. They can help you design, build, and implement custom solutions that fit your needs.

Implementation and support services: oAppsNet provides end-to-end implementation and support services for Oracle technologies, including project management, testing, training, and ongoing support. This means you can rely on them to guide you through the entire process, from start to finish.

Collaborative approach: oAppsNet takes a collaborative approach to work with clients, working closely with them to understand their business needs and requirements. This allows them to provide tailored solutions that are aligned with your business goals.

Proven track record: oAppsNet has a proven track record of delivering successful Oracle implementations and solutions to clients across various industries. This means you can trust them to deliver high-quality results that meet your expectations.

When looking for a partner with deep Oracle expertise, customization capabilities, implementation and support services, a collaborative approach, and a proven track record, oAppsNet may be a good choice for your Oracle needs.

March 21, 2023