SDS:Advanced search.php

From SMUSwiki
Jump to navigation Jump to search

This page lets you search and create lists for very specific criteria concerning students, parents, and addresses.

Adding Search Terms

When you first come to the page, you will see a drop-down list, and a button that says "Add search term". The list contains every criterion that it's possible to search on, and is grouped by student properties, parent properties, and address properties. To add a search term, decide what criterion you want to search on, select it and hit the button. You can continue doing this until you've selected all the criteria you want.

Configuring Search Terms

Specifying Search

Each search term has an operator list and a term box. The operator list contains such options as "=", "≠", ">", "<", etc. The term box is either an empty textbox or a list, to the right of the operator.

To make sure your term is constructed correctly, just try reading the line out loud. For example:

student: legal_first_name > M

Means "the student's legal first name is (alphabetically) greater than the letter M".

Relating Terms

If you have more than one search term, subsequent terms will also have a relation list in front of them, with the options of "And" or "Or". By default, these will all be set to "And", and therefore all of the search terms will be required to be true. If you set some of these to "Or", you will create groups of optional search terms. For example:

term1
AND term2
OR term3
OR term4

AND term5

Is evaluated as:

term1 AND (term2 OR term3 OR term4) AND term5

Hints

Hit "Delete" to remove a search term.

If you want to search only for enrolled students, add "status" as one of the search terms.

The results will be formatted differently, depending on whether you're searching for student, parent, or address information. If you have terms relating to more than one of these, you will have another list next to the search button, entitled "Show results for", which lets you choose the output format.

From the results page, press the "Back" link at the bottom of the page, instead of the Back button in your browser.

TimeStamp dates should be selected from date dropdowns. e.g. TimeStamp > 1-January-2009 will give you all the addresses that have been changed or created since January 1st, 2009.

Example

If you want to get a list of all the addresses belonging to enrolled students who live in Victoria, and were either born before 1991 or are in grade 8:

  1. Select "status" under the "student" header, and hit "Add search term".
  2. Do the same with "birth_date" under the "student" header.
  3. Do the same with "grade" under the "student" header.
  4. Do the same with "city" under the "address" header.
  5. The first term defaults to "student: status = Enrolled", so leave this as it is.
  6. Set the second term to "And student: birth_date < 1-January-1991".
  7. Set the third term to "Or student: grade = 8".
  8. Set the fourth term to "And address: city = Victoria".
  9. Set "Show results for" to "address".
  10. Click "Search!".