Model Templates : Activity Interface Report : Activity Interface Report Initiation Section

Activity Interface Report Initiation Section

Declarations and assignments in the initiation section apply throughout the template. In the initiation section, one parameter is declared, activity_name, which can be assigned via a special form before template execution. This is the name of the activity for which the interface report is to be generated. In addition, two variables are declared:

st - The status code returned by the database extraction function
act - The ID of the activity for which the report is produced

The body of the initiation section has only one statement between the BEGIN and END keywords. This is an assignment statement that assigns the activity’s ID to the act variable. Because elements are identified in database extraction functions by their IDs and not their names, you must first find the ID for the activity before you can extract information about it. To do this, use the activity’s name as an argument in a database extraction function that returns the corresponding activity’s ID. By assigning this ID to the act variable, you can later use it throughout the template whenever you want to extract information about the activity.