Is empty
This section is available only in EnglishThis block returns True if value can be considered as empty.
- string is empty when length of string is 0
- list is empty when number of list elements is 0
- dict is empty when number of list elements is 0
XML representation of function_is_empty block
<xml xmlns="http://www.w3.org/1999/xhtml">
<block type="text_isEmpty">
<value name="VALUE">
<block type="text">
<field name="TEXT"/>
</block>
</value>
</block>
<block type="dictionaries_isEmpty">
<value name="VALUE">
<block type="dictionaries_create_with">
<mutation items="0"/>
</block>
</value>
</block>
<block type="lists_isEmpty">
<value name="VALUE">
<block type="lists_create_with">
<mutation items="0"/>
</block>
</value>
</block>
</xml>
Block is used on the “if status is empty” row in the example:
- Variable “status” is empty.
- Result is boolean value “true”.
- Key “status” with value “status is empty” is saved into the “item” dictionary.