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 type is performed.
Important hint: Parameter a is expected to the name of the variable, i.e. must be of type Value when specifying the name. For comfort reasons, you can select type Variable and select the needed variable by opening the context menu pressing the right mouse button. After the selection, Lobster_data changes the type back to Value.
If the function is used with a node, a conversion to Boolean is done and the node is entered if the result after conversion is true. The result of the conversion depending on the previous 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 |
VAR_VAR1 |
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 |