A method cannot be inserted into a 4D Write area if the $0 variable has not been typed. For example, the following method will not consistently insert into a 4D Write area:
: ([Table 1]Field1="N")
: ([Table 1]Field1="C")
: ([Table 1]Field1="P")
The method is designed to insert certain text dependant on the current value of [Table 1]Field1. Should that field not equal one of the given values the method will not be inserted into the 4D Write area. On the other hand, the following method will always be inserted:
This method will insert even if the value of Field1 is not N, C, or P. The return value for $0 would be an empty string, but since $0 is not undefined the method will get inserted.
For more information on inserting methods into 4D Write areas see Tech Tip 35486: How to insert a method in a 4D Write document