Include Letters of Recommendation Data in Files Export Manifest File
When using the Files Export feature to export letters of recommendation (LORs), Outcomes allows you to include a manifest file that you can configure to contain metadata about the files you're exporting. If you choose to do this, you may wish to include document-specific metadata in this manifest file. By default, this option is not available. However, using the advanced configuration detailed below, you can pull the LOR metadata (e.g., the recommender's contact information) into the manifest file of your Files Export. This can be useful if you want to see key information at a glance without opening the LOR files.
The available metadata includes:
- Recommender's first name (reference.forms.formID.recommender_first_name)
- Recommender's last name (reference.forms.formID.recommender_last_name)
- Recommender's phone number (reference.forms.formID.recommender_phoneNumber)
- Recommender's phone type (reference.forms.formID.recommender_phoneType)
- Recommender's email address (reference.forms.formID.recommender_email_address)
- Recommendation date created (reference.forms.formID.recommendation_date_created)
- Recommendation requested date (reference.forms.formID.recommendation_request_date)
- Recommendation due date (reference.forms.formID.recommendation_due_date)
- Did the applicant waive the right of access to the recommendation? (reference.forms.formID.waive_right_of_access)
- Approval for schools to contact the recommender (reference.forms.formID.ok_to_contact_recommender)
- Approval for Liaison to contact the recommender (reference.forms.formID.will_contact_recommender)
- Committee evaluation? (reference.forms.formID.committee_evaluation)
- Evaluation type (reference.forms.formID.evaluation_type)
- Evaluation status (reference.forms.formID.evaluation_status)
- Recommender's organization (reference.forms.formID.recommender_organization)
- Recommender's title (reference.forms.formID.recommender_title)
- Recommender's occupation (reference.forms.formID.recommender_occupation)
You'll configure this by following these steps:
- Build a File Export with a JavaScript snippet in its filename.
- Adjust the manifest file to include fields in a specific order.
- Adjust manifest file fields with another JavaScript snippet that extracts metadata from the filename in step 1.
Build the File Export
Begin by creating a new export and selecting Files as your export type.
Give the export a name, and find the LOR document on the right.
Adding the Letters of Recommendation Documents
Depending on your Outcomes environment, letters of recommendation can appear in different ways.
- In some cases, the LOR documents will appear as multiple Recommendation PDF files. Drag and drop each of them into the File Sources to Include window.
- In other cases, the LOR document may appear as eval_uploaded_letter. Drag and drop it into the File Sources to Include window.
Note that you may need to update the files you've selected here when a new cycle begins.
Add JavaScript Code to the Filename of the Export
Once you've added the letters of reference as a file source, you'll need to update your selection by adding a JavaScript expression to the filename. This expression extracts the LOR metadata and places it in the name of the file that you're exporting.
- In the {filename} field, add the following JavaScript expression. (Use the view source icon at the top right to copy the code snippet.)
{{filename}}_{{reference.forms.formID.recommender_first_name}}_{{reference.forms.formID.recommender_last_name}}_{{reference.forms.formID.recommender_phoneNumber}}_{{reference.forms.formID.recommender_phoneType}}_{{reference.forms.formID.recommender_email_address}}_{{reference.forms.formID.recommendation_date_created}}_{{reference.forms.formID.recommendation_request_date}}_{{reference.forms.formID.recommendation_due_date}}_{{reference.forms.formID.waive_right_of_access}}_{{reference.forms.formID.ok_to_contact_recommender}}_{{reference.forms.formID.will_contact_recommender}}_{{reference.forms.formID.committee_evaluation}}_{{reference.forms.formID.evaluation_type}}_{{reference.forms.formID.evaluation_status}}_{{reference.forms.formID.recommender_organization}}_{{reference.forms.formID.recommender_title}}_{{reference.forms.formID.recommender_occupation}}
- Update the variables in the expression to match those in your environment:
- Form name: In the expression, the variable formID appears for each data point. This should be updated with the name of the form where your recommendations exist. For example, you may need to replace formID with reference.forms or overall_recommendation, or something else, depending on the name of your evaluation form.
- Field key: In the expression, the field keys appear after the form name (e.g., recommender_first_name, recommender_last_name, etc.). If these field keys do not match the keys on the forms in your environment, you'll need to update them accordingly.
In the example below, the form name is overall_recommendation and the field names match the original expression.
{{filename}}_{{reference.forms.overall_recommendation.recommender_first_name}}_{{reference.forms.overall_recommendation.recommender_last_name}}_{{reference.forms.overall_recommendation.recommender_phoneNumber}}_{{reference.forms.overall_recommendation.recommender_phoneType}}_{{reference.forms.overall_recommendation.recommender_email_address}}_{{reference.forms.overall_recommendation.recommendation_date_created}}_{{reference.forms.overall_recommendation.recommendation_request_date}}_{{reference.forms.overall_recommendation.recommendation_due_date}}_{{reference.forms.overall_recommendation.waive_right_of_access}}_{{reference.forms.overall_recommendation.ok_to_contact_recommender}}_{{reference.forms.overall_recommendation.will_contact_recommender}}_{{reference.forms.overall_recommendation.committee_evaluation}}_{{reference.forms.overall_recommendation.evaluation_type}}_{{reference.forms.overall_recommendation.evaluation_status}}_{{reference.forms.overall_recommendation.recommender_organization}}_{{reference.forms.overall_recommendation.recommender_title}}_{{reference.forms.overall_recommendation.recommender_occupation}}
Configure Manifest File Fields
Once you've configured the File Sources to Include area, you can work with the Manifest File area to configure what metadata gets exported in that file.
To do this, click the plus sign under Add Manifest.
Next, name the Manifest file, and select the data points seen below in the Columns area. For the code to work properly as written, add all columns in this order:
Add JavaScript Code to Manifest File Fields
Once you've added the columns to your manifest file, you'll need to add a JavaScript snippet to each field. The snippet will use the filename created above to extract the required data into the manifest file.
Click the expression icon on each field and paste the following JavaScript expression.
{ return (file.fileName.split(".pdf")[0]).split("_")[2]; }
This expression needs to be modified for each field by adjusting the last number incrementally. The expression above captures the second item in the filename. In this case, it's the recommender's first name. To capture the third item, change the final 2 to a 3, as seen below. Use this for the Recommender- Last Name column, as this adjustment captures the recommender's last name.
{ return (file.fileName.split(".pdf")[0]).split("_")[3]; }
For the next field (Recommender - Phone Number), use this expression:
{ return (file.fileName.split(".")[0]).split("_")[4]; }
Continue in this pattern until all fields are accounted for. The list below indicates what number should be included for each data point.
- Recommender's first name (reference.forms.formID.recommender_first_name)
- Recommender's last name (reference.forms.formID.recommender_last_name)
- Recommender's phone number (reference.forms.formID.recommender_phoneNumber)
- Recommender's phone type (reference.forms.formID.recommender_phoneType)
- Recommender's email address (reference.forms.formID.recommender_email_address)
- Recommendation date created (reference.forms.formID.recommendation_date_created)
- Recommendation requested date (reference.forms.formID.recommendation_request_date)
- Recommendation due date (reference.forms.formID.recommendation_due_date)
- Did the applicant waive the right of access to the recommendation? (reference.forms.formID.waive_right_of_access)
- Approval for schools to contact the recommender (reference.forms.formID.ok_to_contact_recommender)
- Approval for Liaison to contact the recommender (reference.forms.formID.will_contact_recommender)
- Committee evaluation? (reference.forms.formID.committee_evaluation)
- Evaluation type (reference.forms.formID.evaluation_type)
- Evaluation status (reference.forms.formID.evaluation_status)
- Recommender's organization (reference.forms.formID.recommender_organization)
- Recommender's title (reference.forms.formID.recommender_title)
- Recommender's occupation (reference.forms.formID.recommender_occupation)
Afterwards, save your export file and run your export.
Updating the Code for New Cycles
In many cases, Outcomes adds files for each new cycle. This includes documents that are used in Files Exports. In this case, the code for this configuration will need to be updated when a new cycle arrives. To make the needed updates:
- Go to the Exports section of the Settings Menu and click the export you configured.
- Find the LOR documents, which may be different for the new cycle.
- Drag and drop the new LOR documents into the Files to Include window.
- Place the JavaScript code in the filename of each LOR document you've added.
- Update any variables as needed.
- Save your export.