AdobeStock_455007340

Keep Local UDF Variables Local

Variables defined within a User Defined Function are of type VARIABLES. This means that a simple (in a tag based UDF) can overwrite other variables. To keep local variables truly local, use the VAR prefix, as in . This way “name” will persist for the duration of the UDF processing, and will not set (or overwrite) any variables outside of the function. (Applies to: ColdFusion MX)

Leave a Reply