Appendix: Using the EXPRESSION Element Tag

Similar to an Expression-type Question, an EXPRESSION element tag lets you trigger an automated process each time its host content is rendered. If the expression returns a value, it will appear in the resulting content according to the element tag's position within the markup.

This tag has the following default syntax:

<%# EXPRESSION(Expression) %>

An example of a complete EXPRESSION element is as follows:

<p>The current date is:</p>
<p><%# EXPRESSION(GetDate();) %></p>

This markup renders two paragraphs, the first containing some static text and the other containing the results of a GetDate function call, similar to the example below:

The current date is:
23/05/2017

Unlike in the Expression Editor, you must write the whole expression on a single line, with each statement followed by a semicolon as normal.

If your expression includes multiple statements, its result will be the value returned by the final statement able to do so.