Skip to main content
Skip table of contents

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:

AreaForm

Arguments

Separated by semicolon

Dates

date:MM/dd/yyyy

form on WEB page

~(*contact_info[;...])

form on Object Report

  • ^(*contact_info[;...])
  • ~(*contact_info[;...])

form in Quick Export

  • ^(*contact_info[;...])
  • ~(*contact_info[;...])

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
    • Email
    • 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)

WhatFilter 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)

WhatFilter contacts by relationship to the student.

Keyword

Flags

Default

none (the default behavior is to show only active contacts

Values

Comma-separated list of:

  • include-inactive
  • only-inactive
  • custodial
  • non-custodial
  • emergency
  • non-emergency
  • lives-with
  • not-lives-with
  • school-pickup
  • not-school-pickup
  • receives-mail
  • not-receives-mail
  • dataaccess
  • not-dataaccess
  • webaccount (WAA - as of PS 12.1.3.0)
  • not-webaccount (WAA - as of PS 12.1.3.0)

Examples

~(*contact_info;flags=include-inactive)

asof-pers (As Of Person)

WhatFilter 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

  • A date is specified as date:MM/dd/yyyy.
  • A value of current includes todays active contacts where today falls between (inclusive).
  • A value of past includes yesterday's active contacts only; cannot have a start or end date after today.
  • A value of future includes tomorrows active contacts only, cannot have a start or end date before today.
  • A value of active includes contact with contact details closest to today's date. There can only be one active contact. Active contacts should not be confused with activating a contact.

Examples

  • ~(*contact_info;asof-pers=current)
  • ~(*contact_info;asof-pers=current,past,future)
  • ~(*contact_info;asof-pers=date:03/30/2017)

max-pers (Max Persons)

WhatLimit 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)

WhatExtract 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)

WhatDetermines which categories of contact data to include.

Keyword

Cat

Default

Dem

Values

all, or comma-separated list of rel, demo, phone, email, addr

Notes

  • Categories are processed in the following order: dem, rel, phone, email, addr.
  • If an unrecognized category is passed, PowerSchool defaults to dem (demographics).

which-val (Which Value)

WhatExtract 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

WhatFilter 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)

WhatFilter 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

  • This setting is only supported for addresses (not email or phone number).
  • A date is specified as date:MM/dd/yyyy.

Examples

  • ~(*contact_info;as-of=current)
  • ~(*contact_info;as-of=date:12/31/2017)

val (Value)

WhatValues from a category to report.

Keyword

Val

Default

All

Values

all, or comma-separated list of object fields:

Demographics:

  • acctemail (WAA account email - as of PS 12.1.3.0)
    acctid (WAA accountId - as of PS 12.1.3.0)
  • active
  • employer
  • firstname
  • gender
  • language
  • lastfirst (lastName, firstName middleName)
  • lastname
  • middlename
  • personid (as of PS 12.1.3.0)
  • prefix
  • stateid
  • statenum
  • suffix

Relationship:

  • active
  • custody
  • dataaccess
  • emergency
  • enddate
  • liveswith
  • receivesmail
  • relationship
  • schoolpickup
  • srexcluded
  • startdate

Address:

  • city
  • country
  • enddate
  • line2
  • startdate
  • stateprovince
  • street
  • type
  • unit
  • postalcode

Phone:

  • phone
  • preferred
  • sms
  • type

Email:

  • email
  • primary
  • type

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)

WhatSpecifies the delimiter to use between multiple contacts.

Keyword

contact-delim

Default

Dlf

Values

  • dlf (double line-feed)
  • lf (line-feed)
  • p (HTML paragraph: <p>)
  • br (HTML break: <br>)
  • comma (, )
  • barecomma (,)
  • semicolon (;)
  • space ( )
  • pipe (|)

Notes

Reports do not honor lf or dlf; use p or br instead.

Examples

~(*contact_info;contact-delim=dlf)

item-delim (Item Delimiter)

WhatSpecifies the delimiter to use between multiples of the same item, such as multiple phones, multiple addresses, etc.

Keyword

item-delim

Default

Comma

Values

  • dlf (double line-feed)
  • lf (line-feed)
  • p (HTML paragraph: <p>)
  • br (HTML break: <br>)
  • comma (, )
  • barecomma (,)
  • semicolon (;)
  • space ( )
  • pipe (|)

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

  • dlf (double line-feed)
  • lf (line-feed)
  • p (HTML paragraph: <p>)
  • br (HTML break: <br>)
  • comma (, )
  • barecomma (,)
  • semicolon (;)
  • space ( )
  • pipe (|)

Notes

Reports do not honor lf or dlf; use p or br instead.

Examples

~(*contact_info;value-delim=lf)

cat-delim (Category Delimiter)

WhatSpecifies the delimiter to use between multiple categories, such as demographics, email, etc.

Keyword

cat-delim

Default

Lf

Values

  • dlf (double line-feed)
  • lf (line-feed)
  • p (HTML paragraph: <p>)
  • br (HTML break: <br>)
  • comma (, )
  • barecomma (,)
  • semicolon (;)
  • space ( )
  • pipe (|)

Notes

Reports do not honor lf or dlf; use p or br instead.

Examples

~(*contact_info;contact-delim=dlf) 

Localization

locale

WhatSpecifies 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)

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.