A Global Event Rule is a library of shared code within a configurator, similar to the more commonly-used Global Rule. However, Global Event Rules can write to UI elements. And the types, functions, and subroutines that are defined within a global event rule are only accessible from value rules and event rules.
Storing your Subroutine / Function
When writing a function or subroutine in Snap, consider which location for your library would be best.
| Benefit | Safe Function |
Global Rule |
Global Function |
|---|---|---|---|
| Logic available to entire environment |
|
||
| Logic available through the REST API |
|
||
| Logic hidden |
|
||
| Logic available to only this configurator/scene |
|
|
|
| Calculates faster, without network lag |
|
|
|
| Can write directly to UI elements |
|
|
|
| Can read directly from UI elements |
|