{# Choose fields to include #}
{% set includeReasons = true %}
{% set includeRecommendations = true %}
{% set showRsnRecLabels = false %}
{% set includeActions = true %}
{% set includeNotes = true %}
{% set includeAdditionalNotes = true %}
{# Do you want to link this referral to the student's assigned advisor? Change cf_1 to your assigned advisor email field #}
{% if false %}
{% set staffSeq = getRecordFieldData('Staff','Email', Student.CustomData.cf_1,'Sequence') %}
{{ setResultActions('AssignConsultant', staffSeq) }}
{% endif %}
{# Who should this email be directed to? Student.First_Name, Faculty.FirstName, Consultant.First_Name, or write it in #}
{% set first = Student.First_Name %}
{# Optionally set a condition for when this email should send #}
{% if true %}
{# This email will be sent #}
{% else %}
#ACTION:DO NOT SEND#
{% endif %}
{# ------------------------------------------------- #}
Dear {{first}},<br><br>
{% if Referral.Processed %}
This <b>{{ReferralType.Name}}</b> for <b>{{Student.Full_Name2}} ({{Student.ID}})</b> has been processed by {{Referral.ProcessedBy}} on {{Referral.ProcessedDT|date("m/d/Y")}}. Here are the details of this referral:<br><br>
{% elseif Referral.FollowedUp %}
This <b>{{ReferralType.Name}}</b> for <b>{{Student.Full_Name2}} ({{Student.ID}})</b> has been followed-up on by {{Referral.FollowUpBy}} on {{Referral.FollowedUpDT|date("m/d/Y")}}. Here are the details of this referral:<br><br>
{% else %}
This <b>{{ReferralType.Name}}</b> for <b>{{Student.Full_Name2}} ({{Student.ID}})</b> has been created by {{Referral.CreatedBy}} on {{Referral.CreatedDT|date("m/d/Y")}}. Here are the details of this referral:<br><br>
{% endif %}
{% if Course.Subject %}
<b>Subject:</b> {{Course.SubjectCourse}} {{Section.Code}} {% if Faculty.SalutationFullName %}({{Faculty.SalutationFullName}}){% endif %}<br>
{% endif %}
{% if Consultant.FirstLast %}
<b>Consultant:</b> {{Consultant.FirstLast}}<br>
{% endif %}
{% if Referral.NotesInstrData and includeNotes %}
<b>Notes:</b> {{Referral.NotesInstrData}}<br>
{% endif %}
{% if Referral.AdditionalNotes and includeAdditionalNotes %}
<b>Additional Notes:</b> {{Referral.AdditionalNotes}}<br>
{% endif %}
{# Example for custom questions
The answer to {{Questions.CODE}} was {{Answers.CODE}}
#}
<br>
{% if includeReasons and Reasons %}
The <b>reasons</b> for this referral are:
<ul>
{% if showRsnRecLabels %}
{% for key,value in ReasonsAndLabels %}
<li>{{ value }}</li>
{% endfor %}
{% else %}
{% for key,value in Reasons %}
<li>{{ value }}</li>
{% endfor %}
{% endif %}
</ul>
{% endif %}
{% if includeRecommendations and Recommendations %}
The <b>recommendations</b> for this referral are:
<ul>
{% if showRsnRecLabels %}
{% for key,value in RecommendationsAndLabels %}
<li>{{ value }}</li>
{% endfor %}<br>
{% else %}
{% for key,value in Recommendations %}
<li>{{ value }}</li>
{% endfor %}
{% endif %}
</ul>
{% endif %}
{% if includeActions and Referral.CustomData.completedActions %}
These <b>actions</b> have been completed so far:
<ul>
{% for actions in Referral.CustomData.completedActions %}
<li><b>{{actions.who}}</b> completed action "{{actions.name}}" on {{actions.date}}{% if actions.notes %}: {{actions.notes}}{% else %}.{% endif %}</li>
{% endfor %}
</ul>
{% endif %}
Thank you.