SBM ModScript was introduced in SBM 11.3. This blog series is intended to supplement the SBM ModScript Guide with background information and detailed use cases. You can find the latest version of the documentation here.
An Introduction to ModScript
Background on SBM ModScript
Transition Related Items
An example script containing several key features of SBM ModScript, including:
Transitioning SBM items
Reading lists of SBM items
Using the from_json() function
Adding Methods to a Class
How to use the script engine's ability to extend classes to add new methods.
How to use the script engine's to_json() and from_json() utility functions.
Algorithms and Lambdas
How to use the script engine's built-in algorithms, along with the optional use of lambdas (anonymous functions).
How to interact with custom DLLs.
REST Call Into ModScript
How to invoke a ModScript via a URL.
How to invoke a REST endpoint from ModScript.
An introduction to the SQL interaction available in ModScript.
How to use regular expressions in ModScript.
A review of how to invoke transitions on Primary/Auxiliary items in ModScript
An experimental approach to class inheritance.
A utility function for encoding a string using base64
Checking the Type of a Variable
Utility functions available for interrogating the type of a var.
Using the singleton design pattern.
A utility function for decoding a base64 value to text (not binary)
Getting an item's file field contents.
Using Ranges for Easy List Interaction
Quick access to the first or last element in a list.