"Find member" operation

This operation will allow users to find a particular member. The user will select the operation from the system menu and the system will prompt the user to enter the last name and/or the number of the member that she wants to find, and the system will display the details of this member. The user may also enter a partial name and/or number of the member(s) in which case the system will show all members whose names contain the entered partial name and/or whose numbers contain the entered partial number.

For us to configure such an operation we need to define a query that will look for members by name and/or number (see also the Data Retrieval). To do this right click on the “Queries” node in the Elements Tree and select “New” from the pop-up menu. The query editor will appear in the working area. Enter the name of the new query “Member” in the list of properties of the query. Select “Member” from the drop down as the business object that the query will be looking for (What to Look For section). We will now define conditions of the search. Conditions are defined in the “Where” panel of the editor. To define the first condition:

  1. Click on the cell in the first row of the Attribute/Expression column and select Member.LastName from the drop down that appears.
  2. Click on the cell in the first row of the Criterion column and select “Contains” from the drop down.
  3. Click on the cell in the first row of the Value/Expression column and select (Ask at run-time) from the drop down.

To define the second condition:

  1. Click on the cell in the second row of the Attribute/Expression column and select Member.MemberNumber from the drop down that appears.
  2. Click on the cell in the second row of the Criterion column and select “Contains” from the drop down.
  3. Click on the cell in the second row of the Value/Expression column and select (Ask at run-time) from the drop down.

We have now defined two conditions that check whether the member’s last name contains the text entered by the user at run time and whether the member’s number contains the number entered by the user at run time.

After the query has been run the system may find one or more instances of the Member object that match the conditions. The system will display a table listing the found instances. For each instance the system will display values of certain attributes, so that a user can identify which instances are shown. We can define which attributes will be shown. Click on the Display As property in the list of properties and tick FirstName, LastName, MemberNumber, DateOfBirth and EmailAddress in the list of Attributes to Display. Then click OK.

We will also sort the results by member’s last name. To specify the sorting criteria click on the cell in the Attribute column of the Sorting of results table and select LastName. Now click on the cell in the Order column and select Ascending.

Our query has been completed – we can click on the “Save” button and the new query will appear in the Elements Tree.

Now we can define the menu item that will run the query that we have defined. We do it in a similar fashion to how we defined the “New library member” menu item (see "Register new member" operation). In the “Administrator” visual perspective we define the “Find” folder item and underneath it we define the “Library member” item of the “Run Query” type. We select the “Member” query that we have just defined as the query that will be run.

  • Last modified: 2022/09/13 18:15