IsEmpty
Determines whether the string is empty or not.
IsEmpty(text: str) -> Literal["t", ""]
Where:
- text: test string.
Example 1
This example requires the creation of a State Field with the name "test_flag" and any scope.
{{#system~}}
{{#block(hidden=True)}}
{{set(name="test_flag_", value=GetState(name="test_flag"))}}
{{/block}}
{{#if IsEmpty(text=test_flag_)}}
{{SendMessage(message="test_flag is empty")}}
{{SetState(name='test_flag', value="YES")}}
{{else}}
{{SendMessage(message="test_flag is not empty")}}
{{SetState(name='test_flag', value=" ")}}
{{/if}}
{{~/system}}
Updated 10 months ago