KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Transformation tags are evaluated even in quotes
PRODUCT: 4D | VERSION: 19 | PLATFORM: Mac & Win
Published On: August 8, 2022

Transformation tags are useful for inserting 4D variables in texts such as HTML pages. These tags are usually written as HTML-type comments (e.g. <—#4DTEXT vData—>). However, unlike HTML comments, enclosing them in quotes does not only make them a string. Instead, the tag is always evaluated first, then the value set as a string. For example, given a variable vData that contains some value like 616, the syntax “<—#4DTEXT vData—>” would not output to literally “<—#4DTEXT vData—>”. Since tags are always evaluated, “<—#4DTEXT vData—>” outputs to “616”.