Text append to variable
Block appends connected string value to an existing variable value. Left side defines the variable. String value from right side is appended to string in specified variable.
XML representation of text_append block:
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="text_append">
<field name="VAR">item</field>
<value name="TEXT">
<block type="text">
<field name="TEXT">value</field>
</block>
</value>
</block>
</xml>
Block is used with variables “join_text” and “join_item” in the example.
Variable “join_text”:
- Appends text “address” to the variable, output is value “ipaddress”.
- Appends value of the “join_text” variable (text: “ipaddress”) to the variable, output is value “ipaddressipaddress”.
- Appends value of the “user” key from “item” dictionary to the variable (text: “administrator”), output value is “ipaddressipaddressadministrator”.
Cycle is used to go through the “item” dictionary values and a text containing all keys and values of “item” dictionary is saved to the “join_item” variable:
- The value of variable “key” is appended to the variable (value “user”).
- The colon character is appended to the variable.
- The value of the key “key” from the “item” dictionary is appended to the variable (value “administrator”).
- The semicolon character is appended to the variable.
- The value of variable “key” is appended to the variable (value “ip”).
- The colon character is appended to the variable.
- The value of the key “key” from the “item” dictionary is appended to the variable (value “8.8.8.8”).
- The semicolon character is appended to the variable.