ListPrepend

Filters a delimted list and returns the values from the callback test

Method Signature

ListPrepend(list=[string], value=[string], delimiter=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])

Arguments

Argument
Type
Required
Description
Default

list

string

true

string list to filter entries from

value

string

true

delimiter

string

false

string the list delimiter

,

includeEmptyFields

boolean

false

boolean whether to include empty fields in the returned result

false

multiCharacterDelimiter

boolean

false

boolean whether the delimiter is multi-character

false

Examples

Prepend to a List using the List member function

Run Example

seinfeldList = "Close Talker,Soup Nazi";
seinfeldList = seinfeldList.listPrepend( "Puffy Shirt" );
writeOutput( seinfeldList );

Result: "Puffy Shirt,Close Talker,Soup Nazi"

Prepend to a List using a dash delimiter

Run Example

Result: "0-1-2-3-4"

Prepend to a List with Empty Fields On

CF2018+

Run Example

Result: ",,Jan,Feb,Mar,Apr"

Prepend to a List with Empty Fields Off

CF2018+

Run Example

Result: "Jan,Feb,Mar,Apr"

Additional Examples

Run Example

Last updated

Was this helpful?