When you execute a WebFOCUS report, you can pass parameters from the report to the Maintain procedure. For example, an end user can click on a row in a WebFOCUS report, which then runs a Maintain procedure enabling the end user to edit the data for that row.
The variable binding feature in WebFOCUS Maintain enables developers to write code that passes the parameters from the WebFOCUS report to the Maintain procedure quickly and easily, without even needing to know the Maintain language.
Note: In WebFOCUS Developer Studio, passed name/value pairs are called parameters. In Maintain, replaceable named values are called variables.
Before you can use variable binding in a Maintain procedure, you must create a WebFOCUS report that has a drill down to the Maintain procedure. For more information, see How to Execute Maintain Procedures From WebFOCUS Report Procedures.
After you create your report and specify the drill down parameters, do the following:
WebFOCUS Maintain places the following code at the beginning of your procedure:
Declare variable / A4 = IWC.GetAppCgiValue ( "variable" ) ;
For example, the procedure will not work if you use a variable named CustomerNo to determine which record is pulled from a database of customers, but you use CustomerID as the parameter name in the WebFOCUS report that launches the procedure.
You can, however, manually change the variable name in the Maintain procedure to match the parameter name.
When you import the parameters from a WebFOCUS report into a Maintain procedure, use the Import WebFOCUS Parameters Into Maintain dialog box, shown in the image below, to change the formats of the parameters.
This dialog box includes the following options:
Contains the names of the parameters from the WebFOCUS report that are calling this Maintain procedure.
Contains the proposed format for the parameter.
Opens the Type Wizard, where you can specify a new data type for the parameter. For more information, see Using the Type Wizard.