Blog

How To Transform View Values

by on April 13, 2021

In this article, we detail how to transform values within a view in Backendless Database. This is Part 2 of our deep dive into the Views feature in Backendless.

Follow the links below to read the other parts of this series.

A transformation is a function that is applied to a column in a view. These functions are built in and vary depending on the type of data that is returned from the table.

Note that all views use the same underlying data. If the data is modified in the database, it will be updated in all views that utilize that data. Transformations do not modify the underlying data; they simply change which data is returned from the database.

For this article series, we’re going to use an example database of fictitious movies. We have a table for films with a variety of relations such as category, actors, actresses, and language.

You can read our overview of views here. You can also watch our full Views Playlist here.

Column Transformation

To configure a transformation, click the “double arrow” icon that appears when you mouse over the column. When a transformation is configured, the icon changes to green, otherwise it is gray.

Functions available for transformations vary depending on the type of data of the column. Below you can see the functions available for a STRING type column.

Let’s look at a quick example. As you can see in our table, all of the film titles are fully uppercase. In that same database, the film category name is listed with the first letter uppercase and the rest lowercase. Let’s transform the column filmCategory to UPPER.

As you can see, the transformation icon is now green for the filmCategory column and the data has been transformed to uppercase.

As mentioned before, transformations vary depending on the data type. Above we saw the four options for a STRING. Below, you’ll see the transformation options for a DATETIME type column.

As you can see, there are many options for this column type. Each option gives a brief description of how the transformation works.


Next in our views series, we will take a look at Aggregating Data Values.

Thanks for reading and Happy Codeless Coding!

Leave a Reply