Logmanager dokumentace
Přepnout tmavý/světlý/automatický režim Přepnout tmavý/světlý/automatický režim Přepnout tmavý/světlý/automatický režim Zpět na domovskou stránku

Is empty

This section is available only in English

This 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

Block XML representation

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>

Example of visual representation

Block "Is empty"

Block “Is empty”

Example of block usage

Example of "Is empty" block

Example of “Is empty” block

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.

Processing result

Results of "Is empty" block

Results of “Is empty” block