Privacy Policy and Cookies

By continuing to use our site, you agree to our Privacy Policy and our use of cookies to understand how you use our site, and to improve your experience. Learn More.
I Agree.

SmartClient 14.0: Server Formulas & Templates

Last modified date

Blue background introducing the title of the article "SmartClient 14.0: Server Formulas & Templates".

With the release of SmartClient 14.0, we’re introducing a range of server-side data management capabilities that simplify complex data transformations and boost performance for large datasets. This update includes calculated fields, and server-formatted fields. These features make it easier to manage, format, and retrieve data dynamically and efficiently.

This blog will cover these advanced data-handling features and explain how they enhance SmartClient applications for developers and end users.

Calculated Fields

Calculated fields in SmartClient 14.0 allow you to define fields based on formulas, enabling the creation of dynamic, computed values directly in the DataSource. Simply define a formula using existing fields, and SmartClient handles the rendering, sorting, and filtering. If you’re building dashboards or reports, calculated fields eliminate the need for extra backend logic.

Here is an example of a calculated field that dynamically computes a totalCost field by multiplying unit price by quantity ordered:

<field name="totalCost"
       type="float"
       decimalPad="2"
       decimalPrecision="2"
       format=",0.00">
    <formula>quantityOrdered * priceEach</formula>
</field>

The image below showcases how this works in a grid, with the Total Cost field calculated on the server using the defined formula.

Key Features

  • Formula-Based Definitions: You can define fields that compute their values based on other field data. For example, an order item can include an overallPrice field calculated as price * quantity.
  • Full Integration with Reify: Calculated fields work seamlessly with Isomorphic’s low-code platform, Reify. Even non-developers can define formulas visually to create views and summaries (like order totals) without writing code.
  • Filterable and Sortable: They behave just like regular fields. You can filter, sort, and aggregate them without additional configuration.

SmartClient 14.0 makes it easy to define computed virtual fields declaratively. This enables complex transformations entirely on the client or server, simplifying insight generation within your application.

Previously, formulas and templates were computed only in the browser, meaning you couldn’t sort or filter large datasets based on these fields. With server-side support, SmartClient now handles these calculations directly in the backend, enabling fast, scalable operations even across 10 million+ records.

To see it in action, check out the sample here. Additional documentation can be found here.

Server-Formatted Fields

SmartClient 14.0 also introduces server-formatted fields. These fields are formatted on the server rather than the client, which is crucial when dealing with large datasets where sorting and filtering must use the formatted value. In use cases involving millions of records or composite values (like $lastName, $firstName), server-formatted fields ensure accurate and efficient sorting and filtering.

When the template attribute is declared in the DataSource, SmartClient modifies the generated SQL (or equivalent backend logic) to compute the formatted result server-side.

Here’s an example:

<field name="compositeName"
       title="Full Name"
       length="100">
    <template>#{lastName}, #{firstName}</template>
</field>

This might produce an output like Abbott, John. Because the value is server-generated, filtering and sorting operate correctly, even when only part of the dataset is loaded in the browser.

server-driven field with sorting and filtering working as expected

Key Features

  • Server-Based Formatting: You can configure fields to be formatted on the server, improving handling for high-volume datasets.
  • Improved Performance for Large Data Volumes: Server-formatted fields reduce client-side load and improve query efficiency, especially when working with datasets of five million records or more.
  • Declarative Flexibility: You can decide whether a field should be server- or client-formatted based on application complexity. Server formatting is ideal for high-scale enterprise apps, while simpler apps can continue using client-side formatting. It delivers real-time responsiveness for data-heavy apps without compromising speed or usability.

To see it in action, check out the sample here. Additional documentation can be found here.

Conclusion

SmartClient 14.0 introduces key enhancements in server-side data handling. These include calculated fields and server-formatted fields. Together, they provide powerful tools to efficiently manage, format, and display data at scale.

These features simplify complex data logic, improve responsiveness for large datasets, and empower developers to build scalable, data-rich applications with an enhanced user experience using less effort.

Upgrade discounts are available for licenses purchased within the last 3 months. View our License FAQs for more details, or contact us to discuss your upgrade options.