User Tools

Site Tools


Practical Session 3 | Practical Session 5

Practical Session 4: Processing Object Data

Estimated completion time = 10 minutes.

There are many tools available in EASA to process and manipulate data. The data to be processed can be data entered by users or data read from an outside source, like a database, spreadsheet or text file.

The object under which all the available data processing tools reside is DATA PROCESSING.

A DATA PROCESSING itself has no parameters. It is a Parent for SCALAR and LIST data and related processing.

A SCALAR contains a single value, while a LIST is a sequence of one or more values.

Please follow the instructions below to complete this practical session.

Compute, Map & Expand Objects

The first DATA PROCESSING we use is a COMPUTE. A COMPUTE is an expression that evaluates to a value.

  • On the EASA pages select EASA→Set Mode→Author and open EASAP Builder.

  • Expand the USER INTERFACE branch and then the TABBED PANE LIST.

  • Right-click tabbed_pane_Stock_Screener and select Child→Add DATA PROCESSING. Rename it data_processing_Stock_Analysis.

The first data processing objects to create are compute objects that will store logical expressions that determine whether any filtering of data is performed when the stock data is read from the database.

  • Expand data_processing_Stock_Analysis by clicking on its +.
  • Right-click SCALAR and select Child→Add COMPUTE. Rename it compute_Exchange and set:
Parameter Name Parameter Value
Value:inputbox_Exchange == "" (two empty double-quotes for empty string)

Note: For the above expression the value will either equal 1.0 or 0.0 depending on if the expression is 'true' or 'false'. In step 7, you will use this compute_Exchange DOR (Delimited Object Reference) in a MAP.

Let’s create a similar COMPUTE for inputbox_Sector.

  • Right-click compute_Exchange select Copy.
  • Right-click on it again and select Paste (Sibling).
  • Rename the new COMPUTE compute_Sector and set:
Parameter Name Parameter Value
Value:inputbox_Sector == "" (two empty double-quotes for empty string)

Create a third COMPUTE for inputbox_Field_Name.

  • Right-click compute_Sector, Copy then Paste (Sibling). Rename it compute_Query and set:
Parameter Name Parameter Value
Value:inputbox_Field_Name ==""(two empty double-quotes for empty string)

Now we add a series of MAP's to store values to be used in the WHERE clause of the SQL query that will read the stock data from the database.

  • Right-click compute_Query and select Sibling→Add MAP. Rename it map_Exchange and set:
Parameter Name Parameter Value
Value:compute_Exchange
Inputs:1.0,0.0
Outputs:,AND Exchange = '%inputbox_Exchange%'

Note: The Outputs: parameter value has a space in front of the comma.

map_Exchange is a mapping that takes a particular value of compute_Exchange (the Inputs: field) and sets map_Exchange to a corresponding value (the Outputs: field).

  • If compute_Exchange equals 1.0, map_Exchange will have a value of a space.
  • If compute_Exchange equals 0.0, map_Exchange will have a value of ‘AND Exchange = '%inputbox_Exchange%’.

The map_Exchange DOR will be used in the SQL statement as described in Practical Session 5

Right-click map_Exchange select Copy then Paste (Sibling). Rename it map_Sector and set:

Parameter Name Parameter Value
Value:compute_Sector
Inputs:1.0,0.0
Outputs:,AND Sector = '%inputbox_Sector%'

Note: The Outputs: parameter value has a space in front of the comma.

  • Right-click map_Sector and select Copy then Paste (Sibling). Rename it map_Query and set:
Parameter Name Parameter Value
Value:compute_Query
Inputs:1.0,0.0
Outputs:,AND %inputbox_Field_Name% %inputbox_Operator% %inputbox_Value%

Note: The Outputs: parameter value has a space in front of the comma.

  • Right-click map_Query and select Sibling→Add EXPAND. Rename it Financial_Query and set:
Parameter Name Parameter Value
Value:%inputbox_Field_Name% %inputbox_Operator% %inputbox_Value%

Note: The Value: parameter value has a space in-between the ‘%’ symbols.

EXPAND is used to define one or more lines of text. In the instance above, the EXPAND will take the value of the DORs located in the Value: parameter.

  • Right-click map_Query and select Copy then Paste (Sibling). Rename it map_Query_Report and set:
Parameter Name Parameter Value
Value:compute_Query
Inputs:1.0,0.0
Outputs: , %Financial_Query% ← intial <SPACE> on this line
  • Save your EASAP by clicking on Save button or typing ‘Ctrl-S’.

Your EASAP tree should look similar to the following:

You have now completed Practical Session 4 and you can either proceed to the next session or take a break and exit out of EASAP Builder.

Practical Session 3 | Practical Session 5