Accessing Terminology

Remember, all terminology can be customized to meet the unique needs of your company, see Script Terminology. You can allow for changes in terminology by using terminology phrases in your script.

A terminology phrase takes the form "%project%" which is the internal ID for the term surrounded by ‘%’ characters. Use the Terminology section in the Scripting Studio to lookup the internal identifiers to use.

Notice that there are two forms for a term. For example, project and A_project. The second form will return the correct indefinite article (a/an) required for the term.

Tip:

Singular/plural and capitalization are respected in parsing the terminology.

You can access terminology with the following functions:

Terminology phrases are directly parsed in log and error messages:

To use terminology in scripts:

  1. Administrator set account terminology from Administration > Global Settings > Display > Interface: Terminology.

    Note:

    You only need to enter the replacement term in its singular form. OpenAir automatically generates the plural term where applicable.

  2. Scripts can look up a term using the NSOA.context.getTerm(termid) function and can use "%TERMID%" phrases in strings and parse them with the NSOA.context.parseTerminology(message), NSOA.form.error(field, message), NSOA.meta.alert(message), and NSOA.meta.log(severity, message) functions.

                    var proj_term = NSOA.context.getTerm("Projects");
    // proj_term = "Jobs"
    
    var msg1 = NSOA.context.parseTerminology("%Project% saved!");
    // msg1 = "Job saved!"
    
    var msg2 = NSOA.context.parseTerminology("Notes attached to %project%.");
    // msg2 = "Notes attached to job."
    
    // Automatic terminology parsing
    NSOA.form.error("", "%Project% saved!");
    NSOA.meta.alert("%Project% saved!");
    NSOA.meta.log("Info", "%Project% saved!"); 
    
                  
    Note:

    Singular/plural and capitalization are respected in parsing the terminology.

  3. Users see the messages displayed with the correct account terminology.