Object Search
Object Search is a standard control in the Screen Designer. It can be used to populate a field with a value selected from search results. The following example details how a personal tutor could be recorded against a learner's TRAINEE record by selecting an assessor from a list of search results. The tutorial uses an example user-created field called TRAINEE.U_PERSONALTUTOR, but any field could be used instead. However, please be aware that the contents of the field will be replaced with the selection from the search results.
- In Maytas 5, go to Tools on the toolbar and click New/Load on the Screens panel.
- Select Trainee on the left and double-click *(New Tab).
- Enter Object Search Example in the Name field and tick the Published box.
- Select the Controls tab at the bottom-left.
-
Under the Standard controls section, drag an Object Search control onto the design area.
- Select the Fields tab at the bottom-left.
- Under Trainee, drag U_PERSONALTUTOR onto the design area (please note that this field will not be in your database unless it has been added - an alternative field can be used if required for this example).
- Click the Object Search control in the design area and choose PersonnelBusinessObject from the Search Type on the right. This determines what the search will be for (in this case, it will search for assessors).
-
Enter TRAINEE in the Table Name box and enter U_PERSONALTUTOR in the Field Name box. This determines the field which will be populated.
Please note that the field does not need to be on the tab for it to be populated. The field is placed on the tab in this example to demonstrate how it is populated.
- Click Apply on the ribbon to save changes.
Next we can see the tab in action:
- Open a learner record and go to the Object Search Example tab.
- Click the
button at the end of the Object Search control.
- Search for and select an assessor as usual and click OK.
-
The U_PERSONALTUTOR field will now be populated with the assessor ID of the selected assessor.
There are a number of similar useful applications for the Object Search control. Please contact Maytas Support if you have any queries regarding the use of this control.