Table of Contents
Overview
How To Do It
Additional Notes
Curriculum Calculations Guide
Scheduling Calculation Guide
Related Articles
Overview
This article walks through adding custom formula fields to templates in Academic Scheduling and Curriculum Management.
Formula fields allow you to use number fields in templates to automatically calculate other (net new) fields.
In Curriculum Management, you can add formula fields to Course or Program Templates to say things like “Student works hours = (lab hours + lecture hours) x 3” or “Tuition = total credit hours x 850”.
In Academic Scheduling, formula fields can calculate things like “Enrollment Utilization Rate = Actual Enrollment / Enrollment Capacity” and “Lecture Hours + Lab Hours = Contact Hours”.
How To Do It
Step 1: Navigate to either:
Curriculum > Settings > Course/Program Template > Custom Fields
Scheduling > Settings > Templates > Section Template > Custom Fields
Step 2: Click and drag the formula field onto your template.
Step 3: Click into the formula field you just added to your template in order to configure its question settings.
Step 4: Select “Set Field Formula”.
Step 5: Configure the formula in the modal.
If you need information about the types of configurations available, they are referenced at the bottom of this article and can be accessed via the “Calculations Guide” included within the field’s Question Settings.
Additional Notes
Configuration Updates | Dependent Field Change | Formula Field Using Another Field Formula
Section Rules | Nested Collection Fields | Support
Configuration Updates
If a formula is updated in the template question settings, the existing calculated data will not be updated automatically.
The data will only be updated when the respective course, program, or section is manually updated.
Dependent Field Change
If the dependency is required to make the formula work and the data in a dependent field is cleared, the previously saved data for the formula field will remain unchanged.
In other words, if removing the dependency prevents the formula from being executed correctly, the old value will remain unchanged.
This data will only be updated when the respective course or program is updated with the new dependent data.
If, for example, you have a common scenario like “Enrollment Utilization Rate = Actual Enrollment / Enrollment Capacity” and Enrollment Capacity is returned to a null value for a section, the output for Enrollment Utilization Rate will remain unchanged because the edit would prevent the formula from being executed correctly since we can’t divide by a null.*
If the formula can handle a situation where one of its dependencies is empty, and that data is cleared, it will update normally.
*It still executes, but the calculation results in an error. And when there's an error, we don't have anything to save into that formula field.
Section Rules
You can use Formula Fields to build Filters for Section Rules, making it possible – for example – to verify that Sections meet the required Total Hours range or meet a minimum Space Utilization threshold.
Formula Field Using Another Field Formula
A formula field cannot use other formulas as part of its calculation.
Instead, the user is expected to manually copy and paste the required formula into the relevant place.
Nested Collection Fields
Overview
Support for “Collection” types of nested fields will work to provide context of the current record and children, but cannot traverse to the parent field.
You should use the “record” property to scope the formula to the current record/list entry.
In the below diagram/example, a user could make the description a formula and set the formula to: concat(record.name, " grants ", record.credits, " credits.") to produce a description that is a combination of the name and credits, for each outcome.
Adjacent Records
This can work in the context of adjacent records as well, but we recommend avoiding this use case, as there is an inherent risk that the formula will break if, for example, the desired index does not exist.
Support
Use of formula fields in Curriculum Management and Academic Scheduling supports templates, forms, and proposals.
In Curriculum Management, the tool additionally supports display in the PDFs for Curriculum, Syllabus, and Catalog.
Backend API changes can also trigger formula field updates.
Curriculum Calculations Guide
You can use various expressions inside the formula, supporting both numbers and true/false values.
For a full list of expressions, please visit Math.js Documentation.
Note not all expressions found in Math.js as supported.
We recommend using the Template’s “Preview” function to manually verify the formula is working before saving.
In the below table, assume course.customFields.field1 equals 4, course.credits.creditHours.min equals 2, and course.credits.creditHours.max equals 4.
Scheduling Calculation Guide
You can use various expressions inside the formula, supporting both numbers and yes/no values.
For a full list of expressions, please visit Math.js Documentation.
In the below table, assume section.creditHours equals 4.