Variable Group Search

If the user does not know the Device Number, a search mechanism should be available. The user presses the "Find" button that we created earlier and a screen comes up, where the user can enter a filter and browse through the available Devices. One the selection is made, the screen disappears and the Device Number is pasted in the Device Number field on the screen Device.

Before we create the Search screen, we first need a mechanism to get the value from the Search screen to the Device Number field on the Device screen. We can use a Variable (V-) for this like we seen before, but since in bigger applications, there will be more than one search screen, it is probably better to group them together in a Variable Group. We create a Variable Group that can hold a Device Number. If the application grows, we can add more search criteria later.

Figure 97. Variable Group On Object Palette

Screenshot of the pick list button on the object palette.

Press the button "New" on the tool bar of the Variable Group Editor to create a new Variable Group. Now enter the name of the Data Dictionary "deviceNumber" in the "Data Dictionary Name" field and leave the "Initial Value" field empty. Press the "Add" button and you will see that the value now appears in the list. Save the Variable Group with the name "Search".

Figure 98. Variable Group Search

Screenshot of the variable group "Search".

This change has no effect on your application yet, so there will not be any differences when running the application now.