Skip to content

Interface: StringWithOptionsSchema

Defined in: schema.ts:795

A schema representing a value with selectable options.

Extends

  • BaseStringSchema<SelectList>.PropertyWithAutocompleteWithOptionalDisplay<string>

Properties

allowNewValues?

optional allowNewValues: boolean

Defined in: schema.ts:802

Allow custom, user-entered strings in addition to PropertyWithOptions.options.


codaType

codaType: SelectList

Defined in: schema.ts:799

Instructs Coda to render this value as a select list.

Overrides

BaseStringSchema.codaType


description?

optional description: string

Defined in: schema.ts:285

A explanation of this object schema property shown to the user in the UI.

If your pack has an object schema with many properties, it may be useful to explain the purpose or contents of any property that is not self-evident.

Inherited from

BaseStringSchema.description


options?

optional options: PropertySchemaOptions<string | { display: string; value: string; }>

Defined in: schema.ts:264

A list of values or a formula that returns a list of values to suggest when someone edits this property.

Example

properties: {
  color: {
     type: coda.ValueType.String,
     codaType: coda.ValueHintType.SelectList,
     mutable: true,
     options: ['red', 'green', 'blue'],
  },
  user: {
     type: coda.ValueType.String,
     codaType: coda.ValueHintType.SelectList,
     mutable: true,
     options: async function (context) {
       let url = coda.withQueryParams("https://example.com/userSearch", { name: context.search });
       let response = await context.fetcher.fetch({ method: "GET", url: url });
       let results = response.body.users;
       return results.map(user => {display: user.name, value: user.id})
     },
  },
}

Inherited from

PropertyWithAutocompleteWithOptionalDisplay.options


requireForUpdates?

optional requireForUpdates: boolean

Defined in: schema.ts:271

Blocks updates from being sent with a blank value.

Inherited from

PropertyWithAutocompleteWithOptionalDisplay.requireForUpdates


type

type: String

Defined in: schema.ts:807

Identifies this schema as a string.

Inherited from

BaseStringSchema.type