When you import data from Outcomes into another system, there may be compatibility issues due to unsupported characters in some fields. For example, if you're exporting course names, there may be some that appear with slashes, ampersands, or other special characters. If these are not compatible with the system you are importing into, you may wish to remove these characters completely before exporting the fields.
From this article, you'll learn how to use a JavaScript expression in your exports to remove these special characters and, if necessary, enforce a character count limit.
These special characters include exclamation points, question marks, ampersands, semicolons, mathematical symbols, and more.
To accomplish this configuration, you'll need to complete the following:
To complete this configuration, you'll need to add a Calculated Field to a Tabular/Spreadsheet Export. You can do this while configuring your Export by dragging a Calculated Field into the Columns to export.
After dropping in the Calculated Field, use the JavaScript Expressions option by clicking the function icon and dropping the code listed below into the Expression field.
Then, update the code to indicate which field you are exporting.
While following the steps above, use the following code in your JavaScript Expression:
{
let form = "formKey_goes_here";
let question = "questionKey_goes_here";
let charlim = 30;
if (forms[form]) {
let course = forms[form][question];
//strip special characters
course = course?.replace(/\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\_|\+|\'|\ʻ|\=|\:|\;|\<|\>|\?|\,|\.|\"|\|/g,"");
if (course){
return replaceAccents(course)?.substring(0,charlim);
}
}
else {
return "";
}
}
Once you've added this code to your JavaScript expression, you'll need to modify it to indicate which field you want to remove the accented characters from. Each form in the software has a key associated with it. Each field within each form also has a key. You'll need to use these keys to replace the variables listed in the code.
For example, to use this code on a field in one of your application forms:

let form = "english_course_form_1";
let question = "cq_english_course_name_1";

While building the export, click the Try It button at the bottom right of the Expression window to confirm that your adjustments are working.
Search for a record to complete your tests with. Confirm that the appropriate value appears in the Output window.