setNew

Creates a new set. Sets hold unique values; adding a duplicate is ignored. By default the set is unordered and case-sensitive. Pass an array to create a set from its values with duplicates removed.

setNew([data]) → returns any

This function requires Adobe ColdFusion 2025.0.8 and up.  Not supported on Lucee, etc.

Argument Reference

data any

ordered (keeps insertion order), nocase (case-insensitive) or ordered-nocase, or an array of initial values.

Links more information about setNew

Examples
Sample code invoking the setNew function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub