sym.sdk.forms.FieldOption

class sym.sdk.forms.FieldOption(*, value: Any = None, label: sym.sdk.forms.ConstrainedStrValue)

Bases: pydantic.main.BaseModel

An option to display in a drop-down menu. FieldOptions represent value-label pairs to use in drop-down menus. They may be returned by Prefetch Reducers to dynamically generate a list of options for Prompt Fields with prefetch = true.

They are also used in PromptField objects to represent the selected drop-down value as well as the list of selectable options for that field.

field label: str [Required]

A short label, no more than 55 characters, to display in the drop-down menu.

This label will be used to filter the options to display when a requester types into an input box.

Constraints
  • maxLength = 55

validator validate_value_length  »  value

Validates that the given value will not exceed Slack-imposed length limits.

field value: Any = None

The actual value to pass through when selected.

When cast to a string, this value’s length cannot exceed 55 characters.

Validated by