Skip to main content

List

How to use the list type in the connector spec

You can use the list type to allow users to enter multiple items in a single entry box. The user can add and remove items from the list individually.

Fields

PropertyTypeRequiredDescription
keystringYesThe config key used to access the value in connector code.
labelstringYesThe label displayed for the field in the ISC UI.
typestringYesMust be "list".
requiredbooleanNoWhether the field must be populated before saving configuration. Defaults to false.
helpKeystringNoHelp text shown alongside the field to guide the administrator.

Example list item type

{
"key": "allowedDomains",
"label": "Allowed Domains",
"type": "list",
"helpKey": "Enter each email domain that should be permitted access (e.g. example.com)"
}

list input type

Reading list values in connector code

When an administrator saves one or more values in a list field, the config exposes the values as a JavaScript array of strings:

export class MyClient {
private readonly allowedDomains: string[]

constructor(config: any) {
// config.allowedDomains is an array of strings entered by the administrator
this.allowedDomains = config.allowedDomains ?? []
}
}

If the administrator leaves the list empty, the value is an empty array []. Always provide a default (e.g., ?? []) to avoid undefined errors.