a

Grid with line chart

In this example we will see an application that uses line chart and also a field with dynamic images.

   

Creating the Application

1. We will create an application "Grid" using the "releases" table.

Creating a New Field

2. Let's create a new field in the application to display the status image.

   

3. Select the type "text" to the field and name it "flag".

   

4. After we access the onrecord event to configure the dynamic images for the "flag" field.

   

5. Use the following code in the event:

onRecord

if({valuerelease} < 200){

{flag} = "<img src='../_lib/img/nivel1.png' title='".{lang_field_tab03_2_info1}."' />";

}
elseif({valuerelease} >= 200 && {valuerelease} < 300 ){
{flag} = "<img src='../_lib/img/nivel2.png' title='".{lang_field_tab03_2_info2}."' />";

}
elseif({valuerelease} >= 300 ){
{flag} = "<img src='../_lib/img/nivel3.png' title='".{lang_field_tab03_2_info3}."' />";

}

 

Setting the line chart in the field

6. Access the field settings of "valuerelease"

   

7. Make the following settings under the "line chart" tab.

   

8. Click on the button "Run application"

   

 

Click on the button below to see the application running.