KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Give one line at a time with #4DCODE when using PROCESS 4D TAG
PRODUCT: 4D | VERSION: 15.x | PLATFORM: Mac & Win
Published On: May 31, 2017

4D gives the ability to create 4D code via text in which it can be executed in betwen "#4DCODE" while using PROCESS 4D TAG. If a code for example is written as the following:

C_TEXT($tagString;$output)

$tagString:="<--#4DCODE "
$tagString:=$tagString+"alert(\"123\") alert(\"456\")"
$tagString:=$tagString+"-->

PROCESS 4D TAGS($tagString;$output)


Then it is executed, 4D will copy that code literally and put it in a method as shown below:




If this code was ran in a method editor, then ALERT("456") will not execute just as well as this debug window.

To avoid the issue of not properly executing all the lines of code as intended, separate codes in lines.