Display Methods :
These methods are commonly used while performing a calculation or to lookup fields from another table. The
Display modifier is added before the method name that shows that the methods return value is to be displayed on forms and reports.
Please note that the return type of a display method should be of type EDT.
Usage:
The Display modifier can be used on .
- Table methods.
- Form methods.
- Form datasource methods.
- Report methods.
- Report design methods.
Avoid complex calculations on display methods because they are called each time a form is redrawn.
I will be demonstrating the usage of display methods by a quick example.
- This is how the method looks.
As , you can see the methods lookup WorkItemType from another table that is'nt available under the datasource node of this form.
- Add the display method to a form control.
- Change the Data source and Data method properties of the control as follows.
It's better to write Display methods on the table level so that the same method can be used on multiple forms and reports where the table is used as a Datasource.
If the value returned is to be shown in a grid then the Display method must be written on the form datasource level as shown in our example above.
No comments:
Post a Comment