Visual Coding (VC) blocks are components used in Visual Coding. A block performs a specific task based on the parameters supplied to it and then returns one or more values.
There are many built-in blocks in Aquro that perform most actions you'll ever need in an application.
The basic concept of a block is to accept arguments, then execute a specific JavaScript and finally return a status and optionally return one or more result values.
With custom coding blocks you may write code for a specific action or function in your app and then reuse this code throughout the app by adding this custom block to your Visual Coding scripts.
When working with coding blocks, there are a few terms that are important to understand.
The name of the input parameters
The name of the return values
The name of the status(es) the block may return (normally "Done" or "Error")
Each block contains of 5 different JavaScripts and one set of possible return statuses.
The different scripts in a block are:
This is the script that configures which input parameters this block accepts and which values to list in the window. Read more here.
The code in this script is triggered when an inbound is changed. This can be useful to validate data. Read more here.
This script configures which return values the block will return back and which values to list in the window. Read more here.
OUTBOUNDCHANGEDEVENT
The code in this script is triggered when an outbound is changed. Read more here.
EXECUTE
This script is the actual function of the block. When the block is used inside your final app, this is the code that will be executed. Read more here.