How to Customize the Purchase Agreement Page in Oracle Redwood UI

 Introduction/ Issue:

Oracle Cloud Redwood UI brings a modern interface, but certain key calculations like the “Total Amount” (sum of Released Amount and Agreed Amount) are not available out of the box on the Purchase Agreement page. In procurement workflows, this missing total can hinder visibility for financial decision-makers.

Why we need to do / Cause of the issue:

The standard Purchase Agreement page in Redwood shows Supplier, Released Amount, and Agreed Amount, but lacks a combined Total Amount field. Users often rely on manual calculations or reports to determine the sum which is inefficient and error-prone during quick reviews or audits.

Adding a custom field in Redwood to calculate this total directly on-screen improves clarity, decision-making, and usability for procurement teams.

How do we solve:

Step 1: Navigate to the Purchase Agreements Section

Start by heading to your Procurement dashboard:

  • Go to Home → Procurement
  • Under Tasks, select Purchase Agreement
  • Open the Redwood-style Purchase Agreements page

 

Step 2: Launch VB Studio and Switch to Advanced Editing

  • Tap the three-dot menu on the top right and choose Edit Page in VB Studio
  • Either jump into an existing project or spin up a new one
  • Once inside, change the mode from Express to Advanced

Step 3: Identify the Correct Layout

You’ll want to focus on the layout used for displaying the agreement fields:

  • Choose agreement searches agreement header layout

Step 4: Duplicate the Existing Rule

To keep things clean, duplicate the current rule:

  • Click the three dots next to the layout and select Edit Rules
  • Clone the default rule and name your version custom Rule

Step 5: Add Your Custom Field

Now it’s time to introduce the new field:

  • Inside your custom rule, click the ➕ icon to add a field
  • Set its name to total amount
  • For type, use string (or numeric, depending on system support)
  • Hit Create

Step 6: Build a Custom Template

Let’s define how that field behaves:

  • Create a new template and call it custom total amount template
  • Click Create to get started

 

Step 7: Write the Logic

With the template open:

  • Go to the Data tab
  • Use this script to calculate the total:

javascriptCopyEditfields.agreementAmount.value + fields.releasedAmount.value

  • For currency formatting, try:

javascriptCopyEditfields.agreementAmount.value + fields.releasedAmount.value + ‘ ‘ + fields.currency.value

  • Mark the field as Read Only
  • Add a label hint like: Total Amount
  • Save your changes

Step 8: Connect the Template

Head back to your layout:

  • Add the newly created total amount field
  • Assign it the custom total amount template

Step 9: Preview and Verify

Finally, double-check everything:

  • Make sure there are no hidden rules blocking visibility
  • Return to the Purchase Agreements page
  • Confirm the Total Amount displays as expected (e.g., “1000000 USD”)

 

Conclusion:

This blog shows how to leverage Oracle Redwood’s flexibility in Visual Builder Studio to enrich standard pages without modifying core code. By creating a new “Total Amount” field, we improved real-time data visibility for users — an efficient and reusable solution.

This approach can be extended to other financial or procurement pages requiring calculated fields in Oracle Redwood applications.

 

Recent Posts