Contact Information DATs
On this page:
Using the *contact_info data access tag (DAT) you can add certain contact information to Object Reports, Report Cards, Mailing Labels, and Form Letters by formatting various expressions. DATs can also be used on your own custom pages, and to export data through traditional export tools such as Quick Export and AutoSend.
Before Getting Started
- The *contact_info DAT is always run from the student's perspective.
- The DAT starts with a list of contacts for each student, ordered based on the priority order than can be seen on the Students Contact page.
- Each contact can have a number of addresses, emails, or phone numbers that are sorted in ascending priority order for each category. These contact items have attributes such as "Type" than can be used to filter the list.
- The items in the remaining filtered list are assigned a temporary index for reference within the DAT. For example, when a contact has 2 phones with type "Home" and 2 phones with type "Work", if the DAT has filtered to only Home phones then then index 2 will reference the second "Home" phone even if it started out as the 3rd phone number in the unfiltered list.
- If an expression resolves to nothing, an empty string is returned. For example, a request to display the 3rd Home phone in a list of 2.
- If an expression is not allowed to return a field due to the user's Field Level Security role restrictions, a string of five asterisks is returned (*****).
- It is possible for historical and future relationship detail records to exist between a single contact and student. Only one relationship detail record can be active on any given day. The *contact_info DAT only considers the relationship detail record that is active on the day the DAT is used.
- If an argument resolves to nothing, such as asking for the (non-existent) step-god father relationship, or an index 10 of a list of 3, nothing (an empty string) is returned.
Syntax
The following outlines the general forms for calling the *contact_info DAT in different areas of PowerSchool:
Area | Form |
---|---|
Arguments | Separated by semicolon |
Dates | date:MM/dd/yyyy |
form on WEB page | ~(*contact_info[;...]) |
form on Object Report |
|
form in Quick Export |
|
from Student Fields: | *contact_info[;...] |
Keywords | Separate from their arguments by an equal sign |
Default (No Arguments Form)
For the quickest results in calling the *contact_info DAT in PowerSchool, use ~(*contact_info). Doing so, returns the student's first contact's prefix, first name, middle name, last name, and suffix, , such as Dr. Herman Webster Mudgett Sr..
Grammar
Workflow Overview
Determine who to include:
- Start with all contacts for a student.
- Filter by active contact details relationship description if the relationship code type is "relationship."
- Filter by relationship flags.
- Filter by asof-person.
- Filter by active contact details relationship display value.
- Sort the remaining contact by priority order.
- Truncate list at max persons.
- Evaluate which person (index into the current list).
Determine what to include:
- Process the contact by category, extracting field values.
- Categories are processed in this order:
- Demographics
- Relationship
- Phone
- Address
Who to Include
Queries are from the context of the currently selected student. From there, the contact list is narrowed down using the following predicates:
rel (Relationship)
What | Filter contacts by relationship to the student. |
Keyword | rel |
Default | all |
Values | all, or a comma-separated list of relationship type codes, such as mother, father, etc. |
Notes | List order is not preserved. Contacts are ordered by priority, not relationship type. |
Examples | ~(*contact_info;rel=all) |
flags (Relationship Flags)
What | Filter contacts by relationship to the student. |
Keyword | Flags |
Default | none (the default behavior is to show only active contacts |
Values | Comma-separated list of:
|
Examples | ~(*contact_info;flags=include-inactive) |
asof-pers (As Of Person)
What | Filter the list of contacts associated with the student to those valid at a particular time. |
Keyword | asof-pers |
Default | current (today) |
Values | date, or comma-separated list of past, current, future, active, all |
Notes |
|
Examples |
|
max-pers (Max Persons)
What | Limit the number of contacts in the report. |
Keyword | max-pers |
Default | 1 |
Values | all, or number indicating how many people to include |
Notes | This is specified as a one based index. |
Examples | ~(*contact_info;max-pers=1) |
which-pers (Which Person)
What | Extract a contact from the list of contacts associated with a student. |
Keyword | which-pers |
Default | All |
Values | all, or number indicating which index in the list |
Notes | which-pers is evaluated after max-pers and sorting by priority order |
Examples | ~(*contact_info;which-person=all) |
What Data to Include
cat (Category)
What | Determines which categories of contact data to include. |
Keyword | Cat |
Default | Dem |
Values | all, or comma-separated list of rel, demo, phone, email, addr |
Notes |
|
which-val (Which Value)
What | Extract an item from the list of items. |
Keyword | which-val |
Default | 1 |
Values | all, or number indicating which index in the list |
Notes | This setting is applied across categories. This is specified as a one based index. |
Examples | ~(*contact_info;which-val=1) |
type
What | Filter output to include only the specified types of data. |
Keyword | Type |
Default | All |
Values | all, or comma-separated list of any valid type code for the selected categories |
Notes | This setting is applied across categories. If present, any category that accepts type filtering will be filtered by this parameter. |
Examples | ~(*contact_info;type=all) |
asof-val (As Of Value)
What | Filter output to items valid at a particular time. |
Keyword | asof-val |
Default | Current |
Values | date, or comma-separated list of past, current, future, all |
Notes |
|
Examples |
|
val (Value)
What | Values from a category to report. |
Keyword | Val |
Default | All |
Values | all, or comma-separated list of object fields: Demographics:
Relationship:
Address:
Phone:
Email:
|
Examples | ~(*contact_info;val=all) |
Display/Format Options
Delimiters
Delimiters are used to offset different pieces of data from one another. Two commonly used delimiters include:
comma (, ) | A comma followed by a space. Useful in comma delimiting reports. |
barecomma (,) | A comma with no padding. Useful in comma delimiting exports. |
contact-delim (Contact Delimiter)
What | Specifies the delimiter to use between multiple contacts. |
Keyword | contact-delim |
Default | Dlf |
Values |
|
Notes | Reports do not honor lf or dlf; use p or br instead. |
Examples | ~(*contact_info;contact-delim=dlf) |
item-delim (Item Delimiter)
What | Specifies the delimiter to use between multiples of the same item, such as multiple phones, multiple addresses, etc. |
Keyword | item-delim |
Default | Comma |
Values |
|
Notes | Reports do not honor lf or dlf; use p or br instead. |
Examples | ~(*contact_info;item-delim=comma) |
value-delim (Value Delimiter)
What | Specifies the delimiter to use between multiple values specified by the value parameter. |
Keyword | value-delim |
Default | Space |
Values |
|
Notes | Reports do not honor lf or dlf; use p or br instead. |
Examples | ~(*contact_info;value-delim=lf) |
cat-delim (Category Delimiter)
What | Specifies the delimiter to use between multiple categories, such as demographics, email, etc. |
Keyword | cat-delim |
Default | Lf |
Values |
|
Notes | Reports do not honor lf or dlf; use p or br instead. |
Examples | ~(*contact_info;contact-delim=dlf)Â |
Localization
locale
What | Specifies the locale to use when decoding dates. |
Keyword | Locale |
Default | en_US |
Values | Valid locale code, such as el_GR |
Notes | Date strings used in DAT arguments are always entered in MM/dd/YYYY format. Only the return value is localized. |
Examples | ~(*contact_info;locale=en_US) |