LassoScript Utility
Basics Browse Detail

[If_Empty]

Tag Link [If_Empty] Category Conditional
Type Substitution Source Available Yes
Support Preferred Version 8.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LDML Sets Lasso 8.5, Lasso 8.0

Description

[If_Empty] requires two parameters. If the first parameter is not empty (i.e. is not equal to the empty string) then it is returned, otherwise the second parameter is returned. This tag allows a default value (the second parameter) to be returned if the main value (the first parameter) is empty.

Note: The comparison is performed using == so any values that equal the empty string (0, null, etc.) will trigger the default value.

Syntax

[If_Empty: Value, Default]

Parameters

Required Parameters
Value The value to be checked. If is not-empty then this value will be returned.
Value The value to be returned if the first value is empty.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Related Tags

Category Tags