Substitution Tag Hierarchy

For more detailed information regarding substitution tags hierarchies, refer to the Callista Technical Document - td_correspondence_and_communication.
When substitution tags are related to each other in parent-child relationships in the Create Substitution Tag page, then each child variable will inherit the context of all its ancestors (i.e. parent, parent’s parent, etc.) as well as the original context under which the topmost level tag was executed i.e the context in the' In which context will the tag be used:' field.

Note: All substitution tags that are defined as child tags must have the same system communication type context as the parent tag.

In the following template a number of substitution tags are included

Hello [Person Name],
Welcome to Callista University. We have you enrolled in the following Course(s):
[Student Course Attempt]
Where you are enrolled in these unit(s):
                  [Student Unit Attempt]
Thank you for enrolling.

Have a nice day,

Dean of Callista University

At runtime when the communication type is combined with context information, the resulting communication items would look something like this.

Hello John Doe,
Welcome to Callista University. We have you enrolled in the following Course(s):
BATCHELOR OR COMMERCE
Where you are enrolled in these unit(s):
          BUSINESS AND FINANCE – FIRST YEAR
          BUSINESS ETHICS
          MARKETING 101
          ECONOMICS 102
BATCHELOR OR SCIENCE (COMPUTER SCIENCE)
Where you are enrolled in these unit(s):
         PROGRAMMING BASICS
         ARTIFICIAL INTELLIGENCE
         ADVANCED MATHEMATICS
         ENGINEERING PRINCIPLES
Thank you for enrolling.

Have a nice day,

Dean of Callista University

The substitution tags in the correspondence template above are defined in CORW0400.
The [Person Name]
tag could include the following:

S_COMMUNICATION_TYPE_CONTEXT PARENT_SUBSTITUTION_VARIABLE CONTEXT_PARAMETER_NAME SQL STATEMENT
PERSON
p_person_name

SELECT NVL (pe.preferred_name, pe.given_names) ||' '||pe.surname

FROM person_pe

WHERE pe.person_id = :p_person_id

The [Student Course Attempt] tag could include the following:

S_COMMUNICATION_TYPE_CONTEXT PARENT_SUBSTITUTION_VARIABLE CONTEXT_PARAMETER_NAME SQL STATEMENT
PERSON
Person Name
p_course_cd

SELECT crv.title

FROM from course_version,crv
student_course_attempt sca

WHERE pe.person_id = :p_person_id AND
sca.course_cd = crv.course_cd AND
sca.version_number = crv.version_number

The [Student Unit Attempt] tag could include the following:

S_COMMUNICATION_TYPE_CONTEXT PARENT_SUBSTITUTION_VARIABLE CONTEXT_PARAMETER_NAME SQL STATEMENT
PERSON
Student Course Attempt
 

SELECT uv.title

FROM unit_version uv,
student_unit_attempt sua

WHERE sua.person_id = :p_person_id AND
sua.course_cd = :p_course_cd AND
sua.unit_cd = uv.unit_cd AND
sua.version_number = uv.version_number

Note that Substitution tags that can return multiple results and which also have child variables will print results as repeating groups, as in the above example.

 

Last Modified on 1 June, 2012 2:31 PM

History Information

Release Version Project Change to Document
12.1.1.2 1580 - Correspondence New Page