Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Schema Script is a simplified computer language for expression evaluation. It can perform all the standard arithmetic operators and can access schema objects (and their methods) as well as accept parameters and use registered local and global variables.

Schema Script most closely resembles Javascript.

Keywords

script is executed with a call to SchemaEvalRequest or SchemaScriptRun

Info

Schema Script does not support flow control statements like if, do, while and function calls.

 

Keywords

KeywordDescription
trueLogical true
falseLogical false
andLogical AND
orLogical OR
notLogical NOT
nandLogical NAND
orLogical NOR

 

Operators

  
=Assignment
.Member access
-

Subtraction

+Addition
%Modulo
/Division
*Multiplication
**Raise to the power
|Bitwise OR
^Bitwise XOR
&Bitwise AND
~Bitwise NOT
<<Logical shift left
>>Logical shift right
+=Addition assignment
-=Subtraction assignment
*=Multiplication assignment
/=Division assignment
%=Module assignment
**=Power assignment
|=Bitwise OR assignment
^=Bitwise XOR assignment
&=Bitwise AND assignment
<<=Logical shift left assignment
>>=Logical shift right assignment
<Less than
>Greater than
<=Less than or equal
>=Greater than or equal
==Equality check
!=Inequality check
||Logical OR
&&Logical AND
!Logical NOT

Examples

Check if the requested URL contains a site to block

Code Block
return Request.URL.Contains("sitetoblock.com",false)	// returns true if the URL contains sitetoblock.com (Case insensitive)

 

Set a variable and use it in an expression

Code Block
nameToBlock = "Jim"
return User.Name.Contains(nameToBlock,false)