- Description
- How to use it
- Using the chooseWindow in a dynSelect
- Programatically applying filter criteria to the chooseWindow-BusinessEntity
Description
A Choose Window is a floating window containing a simple toolbar and a grid. It serves as a lookup screen allowing the user to select a specific value from the list of records in order to use it in a Select (DynSelect) control in Form.
How to use it
- In Layout Designer start with creating a new object by using the "Choose Dialog (simple)" template which only contains the toolbar, a placeholder gird and a place holder DSO.
- In the Design view, replace the Grid and DSO objects in you screen object after finding them.
Using the chooseWindow in a dynSelect
- Open the designer for the Select (DynSelect) object where the ChooseWindow will be used. Set the value of the LookupScreen attribute to the name of the ChooseWindow object you created earlier.
- Make sure the ChooseWindow and dynSelect objects share the same business entity object. The same mappings/attributes will be used for the choose window functionality.
Programatically applying filter criteria to the chooseWindow-BusinessEntity
Sometimes the chooseWindow must apply filter criteria to its BusinessEntity based on other Fields in the Form in which the dynSelect is used. E.g. the form might have a Customer-Field, and the dynSelect shall only display contacts of that customer. To achieve this, in the Select (DynSelect) the EventBeforeFetch can be used. To do something similar, there is a helper function:
$ akioma.filterDynamicallyGrid (self,'<FieldName from the form which should be taken as filter criteria>','<BE-Field>','<operator>');
// sample
$ akioma.filterDynamicallyGrid (self,'CustNum','CustNumInBE','=');
That code must be placed in the EventBeforeFetch attribute of the chooseWindow-BusinessEntity
Back to Documentation
Back to Home Page