dataEvent_record_OnSelectRows

Function called prior to running the query to populate a business record array. You can use this code event to customize the query used to select rows for a business record.

Syntax

PUBLIC FUNCTION dataEvent_record_OnSelectRows( 
   sqlQuery STRING )
  RETURNS (STRING)

The function has one parameter:

  1. sqlQuery is the SQL query to fill a business record array.
It returns a string with the SQL query.

Usage

When you select the On Select Rows property for the creation of the event, a function shell is created. Enter your code in the function.

This function is called immediately prior to filling a business array with the results of a SELECT statement. In this function, the SELECT statement is provided to the function in a string variable, and is returned to the program at the function end.

Example: On Select Rows

This example uses the On Select Rows code event for the Account Report Data entity in the OfficeStore demo.

In this example, the value of the SELECT statement is displayed to system output.

PUBLIC FUNCTION dataEvent_Account_OnSelectRows(sqlQuery STRING)
    RETURNS (STRING)
    
    DISPLAY "dataEvent_Account_OnSelectRows (Record scope) is raised"
    DISPLAY "sqlQuery: ",sqlQuery
    DISPLAY "dataEvent_Account_OnSelectRows (Record scope) is exited"

    RETURN sqlQuery
END FUNCTION