Blog Post

ISDATATRUE Wrap-around Element

After producing structured JSON data - for example, by using a service request or generating it locally - you can use the ISDATATRUE element tag to conditionally evaluate it. If the result of the evaluation is True, the wrapped content will be displayed; otherwise, it will be hidden.

The following example counts the number of results allocated to ProductData, then checks whether the total is equal to zero. If so, an explanatory paragraph will be displayed.

<%= ISDATATRUE(
    Keyword="ProductData"
    Path="results"
    Type="Count"
    Name="TotalProducts"
    Expression="TotalProducts = 0;") %>
<p>No products in category.</p>
<%= %>

Posted on 21 June 2017
Comments
Blog post currently doesn't have any comments.
 Security code