This exercise modifies the contract browse screen to include a Body Selector, then applies the selected value to fields on the screen.
Adding a Body Selector section
Edit the page section for xxM1Exercise1.
Select the Form tab and create a Body Selector form to use Body Selector fields.
In the Field tab, go to the Form selector at the bottom of the page, select Body Selector, and click Apply Filter.
Click Add to add a new field to this screen. Add the following field:
Field | Label | Populate | View-As |
EndPeriod | To Period | glp-rsp.glp_fdate | Combo |
đNote: EndPeriod and StartPeriod have default behaviour in that selecting the view-as as Combo always displays the description and value together. Choosing Combo description/value instead would duplicate the description.
Click Save after adding the field.
Using the Body Selector value
In the Field tab, go to the Form selector at the bottom of the page, select the Body type, and click Apply Filter.
đNote: Always apply this filter to ensure you are adding fields to the correct form. Adding fields to an incorrect form means they do not display.
In the Body form, create the following fields:
Field | Label |
RO_ContractCosts^TD|0|{EndPeriod} | Costs to Date |
RO_ContractRevenue^TD|0|{EndPeriod} | Revenue to Date |
đNote: This displays the costs and revenue to date for the date entered when the report is run.
The fields take three parameters:
The type of cost (TD = to date; TP = this period; TY = this year; TO = total)
The offset from the period selected. For example: 0 = the period selected (no offset); -1 = the period before the one selected; !12-0 = period twelve in the year of the period selected; !1203 = period 12 in 2003.
The period to report on. This is the value selected on the report selection.
Adjust your Body Span fields to reflect the new columns, and adjust your field widths accordingly.
Running the function
Run the function, then change the To Period value and check that your final two column figures change.




