save variable a(b) type-safe
Group |
Saves the value b into the variable with name a. Before the save, a type conversion to the variable's data type is performed.
Important note: Parameter a is expected to the name of the variable, i.e. must be of parameter parameter type Value when specifying the name. For comfort reasons, you can select parameter type Variable and select the needed variable by opening the context menu pressing the right mouse button. After the selection, Lobster_data changes the parameter type back to Value.
If the function is used on a node, a conversion to data type Boolean is done and the node is entered if the result after the conversion is true. The result of the conversion, depending on the previous data type, is the following:
Type of Variable |
Result |
String, Blob |
true if a text can be interpreted as a number and the condition for numeric values is met or the text starts with t or T. |
Numeric values |
true if the value is larger than 0. |
Date values |
true if the date is after 01.01.1970 00:00:00. |
The result value is the saved value being converted to the variable's type or Boolean if the function is used on a node.
Description of Parameters
Parameter |
Description |
a |
Name of the variable. |
b |
Value to be saved. |
Examples
Defined are the variables var__VAR1 of type String and the value value1 and var__VAR2 of type Integer and value 100.
Parameter a |
Parameter b |
Result if used on field |
Result if used on node |
Value in var__VAR1 |
Value in var__VAR2 |
Value: var__VAR1 |
Value: var__VAR2 |
String: var__VAR2 |
Boolean: false |
var__VAR2 |
100 |
Variable: var__VAR1 |
Value: 123 |
Integer: 123 |
Boolean: true |
var__VAR2 |
123 |
Value: var__VAR2 |
Value: Text |
Integer: 0 |
Boolean: false |
var__VAR2 |
0 |
Value: var__VAR1 |
Value: Text |
String: Text |
Boolean: true |
Text |
0 |