New syntax available for 4D Tags!

Automatically translated from English

A powerful new syntax is available for 4D tags inside texts and Blobs to be processed.

This new syntax is supported in two cases:

  • files with “.shtml” extensions served by 4D Web Server
  • Text and Blobs sent as parameters to the PROCESS 4D TAGS command

The new syntax is available for three tags, 4DEVAL, 4DTEXT and 4DHTML, which can now be written prefixed with a $ (dollar sign) rather than as HTML comments.


$ 4DTEXT($1) is equivalent to <!-- 4DTEXT($1) -->
$ 4DEVAL($1) is equivalent to <!-- 4DEVAL($1) -->
$ 4DHTML($1) is equivalent to <!-- 4DHTML($1) -->


$ 4DEVAL($1)

4DEVAL will evaluate the parameter sent; it can be a variable of any type (numeric, text, date, time) or a 4D Expression.

Note: $4DEVAL($numeric) always uses “.” as decimal separator when the input is a numeric value. If you want to use a local decimal parameter (based on system local settings) then you must use the “String” command inside the $4DEVAL tag, e.g.: $ 4DEVAL(String:C10($numeric))


$ 4DTEXT($message)

The parameter $message contains characters (for example, “<“, “>”) which must be transformed in order to be HTML compatible. The 4DTEXT tag will transform these characters accordingly (>, <).


$ 4DHTML($1)

The parameter contains text that is already supposed to be HTML compatible. The 4DHTML tag will just return the text “as is”.

For more details, please take a look at the 4D v15 R4 upgrade manual.

Roland Lannuzel

• Product Owner & 4D Expert •

After studying electronics, Roland went into industrial IT as a developer and consultant, building solutions for customers with a variety of databases and technologies. In the late 80’s he fell in love with 4D and has used it in writing business applications that include accounting, billing and email systems.

Eventually joining the company in 1997, Roland’s valuable contributions include designing specifications, testing tools, demos as well as training and speaking to the 4D community at many conferences. He continues to actively shape the future of 4D by defining new features and database development tools.