Tutorial: Calculated Field

This tutorial shows how to create a grid ready to export PDF reports and print friendly report pages. It also shows how to perform a specific calculation within a grid.

Creating a new Grid

1. Create a new grid application using the customer table.

2. Open the toolbar menu.

3. Select First, Previous, Next, Last, Row Limit, PDF and Print Align to center on the top toolbar.

Creating the calculated field

4. Open the Fields folder and click on the New field option.

5. Enter 1 for the quantity attribute and click Next.

6. Choose Text for the Type attribute and set Status to Name and Label, then click Create.

Field calculation in the OnRecord event

7. Open the Events folder and click the OnRecord option.

8. Add the following code to the selected event:

 onRecord
if({CreditLimit} ≪= 2000) {
{Status} = "Low";
sc_field_color ("Status" "# AA0000");
}
else{
{Status} = "High";
sc_field_color ("Status" "# 0000AA");
} 

9. Click the Run button on the toolbar.

Tutorials in the same category

Card View HTML

  This tutorial demonstrates how to create a Grid application using the “User defined” ori...

Evaluation Field in the Grid

In this tutorial, you will see how to use the evaluation fields in a Grid application.  We ...

Evaluation Field in Summary

In this tutorial, you will see how to create a Summary by using the evaluation fields. We can use ...

Grid with fixed toolbar

  In this example, we are going to develop a report using a fixed toolbar on the top so we can...

Comment this post