Skip to main content
Liaison

Identifying Degree Types

If you require applicants to have specific degree types, it's valuable to have a field that indicates whether your requirement has been met by each applicant. This can be accomplished in two ways:

  • A text field that lists all Degree Types the applicant has achieved.
  • A Yes or No field to indicate whether the applicant has achieved your desired Degree Type.

With this configuration, you'll use a JavaScript expression to build a Custom Property that delivers one or both of these fields (Options 1 and 2 below). Many institutions use the list (Option 1) for review and the Yes/No flag (Option 2) in scoring models.

These options may be useful if you want to:

  • Flag applicants who meet or do not meet a minimum degree requirement (for example, a master’s degree required for admission).
  • Feed degrees into a scoring model as positive factors.
  • Identify applicants with specific credential patterns (for example, professional or clinical doctorates).

This article focuses on identifying graduate degree types, but the same pattern can be adapted for other degree types or other table data.

Once complete, you can add custom properties to the Application Summary, Sidebar, or other areas for easy visibility.

Degree info in App Summary

Building the Custom Property

First, you'll need to add a calculated field as a Custom Property to create a Degree Types field.

To create this field, create a Calculated Custom Property, and insert the desired snippet below as a JavaScript expression. See the Modifying the Code section to adjust as needed. To copy the code snippet, click the view source icon in the upper right corner of the window below.

Option 1: List of Degree Types

This code presents a comma delimited list of degree types from the Colleges Attended table by specific degree types.

{
    let degree1 = 0;
    let degree2 = 0;

    let u = forms?.colleges_attended?.colleges_attended?.rows;

    let x = [];

    if ((u === undefined) || (u.length == 0)) {
        return null
    };

    for (var college of u) {
        if (college.type_of_degree !== undefined) {
            if (college.type_of_degree.match(/Doctor.*/)) {
                degree1 += 1;
                x.push(college.type_of_degree);
            }
           
            if (college.type_of_degree.match(/Ph.D.*/)) {
                degree1 += 1;
                x.push(college.type_of_degree);
            }
          
            if (college.type_of_degree.match(/PsyD.*/)) {
                degree1 += 1;
                x.push(college.type_of_degree);
            }

            if (college.type_of_degree.match(/Master.*/)) {
                degree2 += 1;
                x.push(college.type_of_degree);
            }
        };
    };

    let test = degree1 + degree2;
  
    if (test >= 1) {
        return x.join(", ")
    };
};
Modifying the Code

Use this section to adapt the sample code to your Outcomes environment and the specific degree types you want to track.

  1. Confirm whether your Outcomes instance is CAS‑integrated or standalone.
    • CAS‑integrated clients: the table reference on line 5 (forms?.colleges_attended?.colleges_attended?.rows) and the field reference college.type_of_degree will work as‑is for standard CAS degree data.
    • Standalone clients: you will need to update the following:
      • Line 5 (let u = …) so it points to the correct form/table in your instance.
      • Every instance of college.type_of_degree to use your actual field key. In most cases, this field will be on the Colleges Attended form if you created a custom degree field there. Use the field dictionary or your form settings to confirm the exact field key name for your degree type field.
  2. Identify which degree types you want to capture.
    • The sample code uses degree1 and degree2 for these degree types.
    • Decide which categories you want to track (e.g., graduate, bachelor's, or associate degrees).
    • After you decide on your categories, you can keep the generic names (degree1, degree2) or rename them for clarity (e.g., change let degree1 = 0 to let masters = 0 and let degree2 = 0 to let phd = 0).
    • If you rename them, be sure to update those names everywhere they are referenced in the code.
  3. Update the match patterns for each degree type.
    • Within the if statements (lines 15–32 in the example), the code uses .match(/…/) to look for specific text in the degree type value.
    • For CAS‑integrated clients: the sample expressions (/Doctor.*/, /Ph.D.*/, /PsyD.*/, /Master.*/) are aligned to the standard CAS Degree Type list and will work out of the box for graduate degrees.
    • For standalone clients: review your own list of values for Degree Type and update each match() pattern to reflect your actual text. This is typically found by checking the applicable form's settings and looking for the field’s Field Key value, or by reviewing the Field Dictionary. Once this is discovered, you can:
      • Change existing patterns (e.g., change /Doctor.*/ to /Bachelor.*/), or add additional if blocks for new types (e.g., insert the example block below as a new degree category).

 if (college.type_of_degree.match(/Bachelor.*/)) {
                degree2 += 1;
                x.push(college.type_of_degree);
            }

  • Note: the .* at the end of each pattern acts as a wildcard, matching any characters that appear after the text you specify (e.g., /Master.*/ matches ‘Master of Arts,’ ‘Master of Science,’ etc.).
  1. Keep the test and return logic aligned with your variables.
    • At the end of the script, line 37 calculates test as the sum of the degree counters, and line 39 returns the comma‑separated list if at least one match is found.
    • If you introduce additional degree counters (for example, let degree3 = 0;), make sure they are incremented in the relevant if statements, and included in the total you test at the end (e.g., let test = degree1 + degree2 + degree3;).
    • You generally do not need to change the return x.join(", ") line unless you want a different delimiter or format.

Option 2: Degree Type Requirement Achieved

This code results in a boolean (Yes/No) field that indicates whether the applicant has attained your degree requirement. Much of the same logic is used as in Option 1, with minor modifications.

{
    let degree1 = 0;
    let degree2 = 0;
 
    let u = forms?.colleges_attended?.colleges_attended?.rows;
 
    if ((u === undefined) || (u.length == 0)) {
        return "No"
    };
 
    for (var college of u) {
        if (college.type_of_degree !== undefined) {
            if (college.type_of_degree.match(/Doctor.*/)) {
                degree1 += 1;
            }
           
            if (college.type_of_degree.match(/Ph.D.*/)) {
                degree1 += 1;
            }
          
            if (college.type_of_degree.match(/PsyD.*/)) {
                degree1 += 1;
            }

            if (college.type_of_degree.match(/Master.*/)) {
                degree2 += 1;
            }
        };
    };
 
    let test = degree1 + degree2;
 
    if (test >= 1) {
        return "Yes";
    }
     else {
        return "No";
    }
};
Modifying the Code

Use this section to adapt the Yes/No code to your environment and requirement.

  1. Confirm whether your Outcomes instance is CAS‑integrated or standalone.
    • CAS‑integrated clients: the table reference on line 5 (forms?.colleges_attended?.colleges_attended?.rows) and the field reference college.type_of_degree will work as‑is for standard CAS degree data.
    • Standalone clients: you will need to update the following:
      • Line 5 (let u = …) so it points to the correct form/table in your instance.
      • Every instance of college.type_of_degree to use your actual field key. In most cases, this field will be on the Colleges Attended form if you created a custom degree field there. Use the field dictionary or your form settings to confirm the exact field key name for your degree type field.
      • Note: these changes mirror the updates described in Option 1, and both options should point to the same degree field.
  2. Identify which degree types satisfy your requirement.
    • Decide what counts as meeting your requirement, for example:
      • Any graduate degree (master’s or doctoral).
      • A bachelor’s degree in a specific discipline.
      • Any degree above a particular level.
    • With the sample code, you can:
      • Remove degree types that do not factor into your requirement.
      • Add additional variables and if blocks for any additional types you want to include.
    • The sample code uses degree1 and degree2 for these degree types. After you decide on your categories, you can keep the generic names (degree1, degree2) or rename them for clarity (e.g., change let degree1 = 0 to let masters = 0 and let degree2 = 0 to let phd = 0).
  3. Update the match patterns for the requirement.
    • Within the loop, each if (college.type_of_degree.match(/…/)) statement tests whether a given row qualifies.
    • For CAS‑integrated clients: keep or adjust the existing patterns (/Doctor.*/, /Ph.D.*/, /PsyD.*/, /Master.*/) depending on whether all graduate degrees should satisfy the requirement.
    • For standalone clients: replace each pattern with the exact strings (or partial strings) used in your Degree Type list. This is typically found by checking the applicable form's settings and looking for the field’s Field Key value, or by reviewing the Field Dictionary. Once this is discovered, you can:
      • Add or remove if blocks to reflect your local values.
      • You can also adapt the pattern to more granular cases, such as specific majors, if your Degree Type or related field contains that information.
    • Note: the .* at the end of each pattern acts as a wildcard, matching any characters that appear after the text you specify (e.g., /Master.*/ matches ‘Master of Arts,’ ‘Master of Science,’ etc.). For more specialized requirements (e.g., only bachelor’s degrees in a particular discipline), you can point these match patterns at another field or modify the strings you search for, using the same approach used in Option 1.
  4. Adjust the Yes/No logic if needed.
    • At the end of the sample code, it sums the counters into test, and the code returns "Yes" if at least one matching degree is found, otherwise "No."
    • If you rename or add degree counters, make sure the test includes all of them (e.g., let test = degree1 + degree2 + degree3;).
    • If you prefer a different output instead of “Yes”/“No” (e.g., “Meets requirement” / “Does not meet requirement”), you can change the strings in the return statements without changing the rest of the logic.

    Example variation:

    if (test >= 1) {
        return "Meets requirement";
    } else {
        return "Does not meet requirement";
    }

    Working with Degree Fields

    Once you've added the custom property, it becomes available to use in other areas of the software. For example, you can add it to the Application Summary, Sidebar, or Applications Grid. You can also include the field in exports or use it in creating segments.

     

    • Was this article helpful?