KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Values inserted into 4D write using WR INSERT EXPRESSION can change
PRODUCT: 4D | VERSION: 14.3 | PLATFORM: Mac & Win
Published On: March 26, 2015

Inside of 4D write area, the command WR INSERT EXPRESSION is useful for inserting 4D expressions. This includes table fields, variables, statements, and methods. The command saves the reference to the expression, but not the value of the expression. Therefore, if the expression changes its value, if the write document has not been saved, the expressions inserted into the document will be changed once the document is reloaded.

A example of this can be seen below:

1. An expression is declared

C_TEXT(exp1)
exp1:="expression1"


2. The value is inserted into a write area
WR INSERT EXPRESSION (area;"exp1")


The result:


3. The value is changed
exp1:="expression2"


4. The write area is reloaded, the write document now looks like