githubEdit

ListQualify

Inserts a string at the beginning and end of list elements.

If this BIF is being called from inside of a query component, and the qualifier is a single quote, any single quotes in the values will be escaped by doubling them up. This protects against SQL Injection attacks.

Method Signature

ListQualify(list=[string], qualifier=[string], delimiter=[string], elements=[string], includeEmptyFields=[boolean], multiCharacterDelimiter=[boolean])

Arguments

Argument
Type
Required
Description
Default

list

string

true

The list to qualify.

qualifier

string

true

The string to insert at the beginning and end of each element.

delimiter

string

false

The delimiter used in the list.

,

elements

string

false

The elements to qualify. If set to "char", only elements that are all alphabetic characters will be qualified.

all

includeEmptyFields

boolean

false

If true, empty fields will be qualified.

false

multiCharacterDelimiter

boolean

false

false

Examples

Simple example for listQualify function with delimiter

To insert a string or character before and after the list elements.

Run Examplearrow-up-right

Result: |boxlang|:|railo|:|144|:|boxlang|:|46|

Example for listQualify function with elements

To insert a string or character before and after the alphabet list elements only.

Run Examplearrow-up-right

Result: |boxlang|:|railo|:144:|boxlang|:46

Example for listQualify function with includeEmptyFields

If includeEmptyFields is true, empty value add in list elements.

Run Examplearrow-up-right

Result: |boxlang|:|railo|:144:||:|boxlang|:||:46

Additional Examples

Run Examplearrow-up-right

Last updated

Was this helpful?