Returns the value if it is not empty, the defaultValue otherwise.

Syntax

Smartsite SXML CopyCode image Copy Code
string string.ifempty(string value, string defaultValue)

Parameters

Name Data Type Description
value String The string that is tested.
defaultValue String The default value that is returned when the value is empty.

Return Value

Data Type Description
String String containing the value if it is not empty, otherwise the specified defaultValue.

Expand image Example

SXML