calculateContainerBlock & calculateMathAddOnBlock
This Block accepts source VC as input and generates output as new VC document.
Variable | Definition | Example of Input |
---|---|---|
name | Refer to the specified field value | field0 |
title | Title of the operation | Summary |
value | Variable to store the value of the field | E0 |
"inputFields": [
{
"name": "field0",
"title": "Summary",
"value": "E0"
},
]
New variable "E0" would be created with a value set to one from the "field0" in the VC document.
"title" is not a mandatory parameter. The value is set automatically as per the user convenience.
Variable | Definition | Example of Input |
---|---|---|
name | Variable that refers to specified field | field0 |
title | Title of the operation | Summary |
value | Points to the value of specified variable | E1 |
outputFields: [
{
"name": "field0",
"title": "Summary",
"value": "E1"
}
]
The output variable "field0" will contain the value from the variable "E1".
"title" is not a mandatory parameter. The value is set automatically as per the user convenience.
This Block performs mathematical calculations sequentially.
"equations": [
{
"variable": "E1",
"formula": "E0*10"
}
]
When above code is executed, a new variable, "E1" will be created which would contain the value of the calculation "E0*10".
In the input VC is { "field0" : 5 }
calculateContainerBlock:
"inputFields": [
{
"name": "field0",
"value": "E0"
}
]
"outputFields": [
{
"name": "field0",
"value": "E1"
}
]
calculateMathAddon
"equations": [
{
"variable": "E1",
"formula": "E0*10"
}
]
Then
- 1.input VC variable "E0" will contain 5 (eg. "E0" = 5)
- 2.When executed a new variable "E1" will be created with the value "E1" = E0*10 = 5 * 10 = 50
- 3.In the output VC there will be "E1" variable
- 4.The result will be VC = { "field0" : 50 }
Last modified 9mo ago