Expressions can be used in dollar-sign expansions. The content between the brackets must then start with an equal sign:
The expression will be evaluated and the value will be used in the expansion.
$(=Year(Today())); // returns a string with the current year.
$(=Only(Year)-1); // returns the year before the selected one.
File inclusions are made using dollar-sign expansions. The syntax is:
The above text will be replaced by the content of the file specified after the equal sign. This feature is very useful when storing scripts or parts of scripts in text files.
Dollar expansions and alternate states
A dollar expansion is normally not sensitive to alternate states. There is one exception, if the dollar expansion has an expression, this is evaluated in the state relevant to the object where the dollar expansion is made.
You have a dollar expansion like the following:
The calculation will return the sum of amount based on the selection in the state of the object.