The Decode Object Tag
In some cases, the data stored in a PowerSchool field can be confusing to someone that does not typically work with the data or the data could just be made easier to read on a report. The Decode object tag allows data to be translated by a method specified by the user like changing M to Male and F to Female.Object tags can be used with a List Students, Object Reports, or Exporting data. Typically, when using list students or exporting student data, the user can only export fields from the student record. Object tags allow the user access to more information, either that the system calculates for the user or from other tables in the database like the schools table.
Instead of typing in a field name, type a tag in the format below. Include the carrot and the parenthesis:
- Instead of fieldname use a PowerSchool field name
- Instead of the spots where value is listed, type the values that could be found in the field
- Instead of the spots where replace is listed, type the value that you want on the report instead of the preceeding value.
- Instead of else, type the value that you want on the report for any records that did not match one of the values that you listed.
There is no limit to the number of value/replace pairs that can be put in a tag, however they must always be listed in pairs. Example: You can not type 11;12;Upperclassman to get both 11th & 12th graders to show Upperclassman on the report. That must be written as 11;Upperclassman;12;Upperclassman.
|^ (decode;^(gender);M;Male;F;Female; )||All students with a gender of M will have Male output on the report. All students with F will output Female. Any students missing gender wil output blank|
|^ (decode;^(grade_level);11;Jun;12;Sen;99;Inactive;Under class-man)||
Note: If a student on this report had an erroneous grade level such as 13, he/she would still output as Under class-man based on this example.