EasySkyCoder.js > Sudo Data Validation Guide

Some functions in EasySkyCoder.js follow the data validation guidelines established below.  

There are typical compare operators like <, >, =, etc however most of these perform text or number comparisons.  There are also some modifications that can be made to the operators to run comparisons as date values or compare a field to another field:

  • A standard operator followed by "d" tells the system to compare values as date values.
  • A standard operator followed by "#" tells the system to compare the value against a value from a second field.
  • + and - can also follow operators to add or subtract from a number or date value.

Operator Data Types Explanation
hasValue Any Checks if a value is not blank
Examples:
hasValue
isBlank Any Checks if a value is blank
Examples:
isBlank
= Any Checks if a value matches a supplied value. Note: Skyward always stores its dates in MM-DD-YYYY format.
Examples:
=5
=05-01-2010
=Bob
!= Any Checks if a value does not match a supplied value. Note: Skyward always stores its dates in MM-DD-YYYY format.
Examples:
!=5
!=05-01-2010
!=Bob
in: Any Checks if a value is found in a comma separated list of values
Examples:
in:5,05-01-2010,Bob

The following table lists all of the Less Than operators.  Switch any < for a > for the equivalent Greater Than operator.

Operator Data Types Explanation
<
<=
Numbers Check if a number is less than another number or less than or equal to another number
Examples:
<5
<=5
<#
<=#
Numbers Check if a number is less than the value of another field or less than or equal to the value of another field
Examples:
<#vCheckLoc
<=#vCheckLoc
<#-
<=#-
<#+
<=#+
Numbers Check if a number is less than the value of another field plus or minus a number
Examples:
//less than (value of vCheckLoc - 2)
<#-2-vCheckLoc
//less than or equal to (value of vCheckLoc - 4)
<=#-4-vCheckLoc
//less than (value of vCheckLoc + 3)
<#+3+vCheckLoc
<d
<=d
Dates Check if a date is less than another date or less than or equal to another date. Dates provided must be in MM-DD-YYYY format.
Examples:
<05-01-2015
<=05-01-2015
<d#
<=d#
Dates Check if a date is less than the value of another field or less than or equal to the value of another field
Examples:
<d#vDOB
<=d#vDOB
<#-
<=#-
<#+
<=#+
Numbers Check if a number is less than the value of another field plus or minus a number
Examples:
//less than (value of vDOB - 1 week)
<#-7-vDOB
//less than or equal to (value of vDOB - 1 year)
<=#-365-vDOB
//less than (value of vDOB + 2 weeks)
<#+14+vDOB