Views enable us to have an alternative Query and Buffer on data held in a Model class as shown in the document “Using Model classes to simplify data access from custom code”. The behavior is similar to .NET DataTable and DataView.
Views can be used to query and manipulate data contained in a DatasetModel class without the requirement to populate the Model from the backend each time.
Creating a new instance of a View
...
Code Block | ||
---|---|---|
| ||
DEFINE VARIABLE oCustomerView AS Test.ModelClasses.CustomerTableModel NO-UNDO. oCustomerView = oCustomerDatasetModel:Customer:CreateView (). |
...
Applying a filter to the View
...
Abstracts the access from the ModelFilter classes to the TableModel for invoking the Filter | |
Abstract base class for generated TableModelFilter classes | |
Provides Filter methods for CHARACTER Buffer Fields | |
Provides Filter methods for DATE Buffer Fields | |
Provides Filter methods for DATETIME Buffer Fields | |
Provides Filter methods for DATETIME-TZ Buffer Fields | |
Provides Filter methods for DECIMAL Buffer Fields | |
Provides Filter methods for INT64 Buffer Fields | |
Provides Filter methods for INTEGER Buffer Fields | |
Provides Filter methods for LOGICAL Buffer Fields |
...
As an example I want to have a list of all german customers whose name begins with “L”.
...