The Student Letter Query

Modified on Fri, Jan 12 at 1:47 PM

Queries

Genesis provides a default query for all new letter templates. Click on the query  icon to make changes to the default query for the newly created letter template. You will be presented with the modify query screen.

Objects

An object can be anything from a Student, Student Fine or an Address. Genesis has over 200 different objects available for querying. An object has properties.

For example: The student object has many properties including name, student id, and ethnicity. By default, the Address and Student object are included in the default query.

Filters

A filter lets you narrow down which of the objects you would like to use by placing conditions on one or more properties of that object.

When an object is added to a query – the default behavior is to retrieve all of the objects in the database.

Sort Objects on Page By

The sort by feature allows you to order the objects that appear on the page. For example: If you had Student Fine objects in your query, you could order them by the fine amount.

Or, just using the Student table, you have options to sort by Homeroom Teacher. See below:

Linked Objects

A linked object allows you to filter, query and display properties for a related object.

Most student letters need to print demographics information about the students that the Address object represents. Most demographic information can be found on the Student object.

To get at this information, we will need to link in the Student object. When linking an object, you need to figure out which common fields form a bond between the two objects.

Luckily, when you add a new Object to the Query, Genesis will automatically figure out the common properties and automatically link them.

In this case, both the StudentContact2Summary object and the Student object have a school year and student id property; thus these two properties will form the link between the two objects.

Linking an object will automatically narrow the query by those linked objects.

For example: let us assume that your school has 2,000 students (each has 1 address object).

If you were to link in the Student Fine object, and there were only 50 fines in the database, then only 50 objects will be returned by the query; eliminating the 1,950 students that do not have a Student Fine object.

When is a new page generated?

The first Object added to the query defines when a new page is generated.

When you have finished your query, you can specify the order of the pages by keying in a comma delimited list of Object and properties.

For example, you could specify: "Student.gradeLevel,Student.studentName" to order the pages by Grade Level and then by Student Name.


For the main Student Letter article, click here.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article