--- title: "Change the Grade Level to Numbers" slug: "change-the-grade-level-to-numbers" description: "How to use a mapping expression in Studio to change a student's grade level from a string to a number." tags: ["Studio", "Field Mappings", "Advanced"] updated: 2023-07-31T17:48:31Z published: 2023-07-31T17:48:31Z canonical: "help.rapididentity.com/change-the-grade-level-to-numbers" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.rapididentity.com/llms.txt > Use this file to discover all available pages before exploring further. # Change the Grade Level to Numbers ## How to Change the Grade Level to a Number The OneRoster data type standard for the `grades` field on the user record is `string` with specific values expected based on the grade. The following example was used to convert a grade level of `KG` to 0 and `PR` to -1 allowing all other grade level values to remain the same. ``` function() { const grades = SRC.grade; if (grades) { const grade = grades[0]; if (grade == 'KG') { return '0'; } else if (grade =='PR') { return '-1'; } else { return grades; } } return null; } ``` ## Related - [Studio Expressions](/expressions.md) - [Mappings, Matching and Event Governance](/mappings-matching-and-event-governance.md)