Show / Hide Table of Contents

Class SelectionInput

A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Add selectable UI elements.

Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data.

To collect undefined or abstract data from users, use the [TextInput][google.apps.card.v1.TextInput] widget.

Google Workspace Add-ons and Chat apps:

Inheritance
object
SelectionInput
Implements
IMessage<SelectionInput>
IEquatable<SelectionInput>
IDeepCloneable<SelectionInput>
IBufferMessage
IMessage
Inherited Members
object.GetHashCode()
object.GetType()
object.ToString()
Namespace: Google.Apps.Card.V1
Assembly: Google.Apps.Card.V1.dll
Syntax
public sealed class SelectionInput : IMessage<SelectionInput>, IEquatable<SelectionInput>, IDeepCloneable<SelectionInput>, IBufferMessage, IMessage

Constructors

SelectionInput()

Declaration
public SelectionInput()

SelectionInput(SelectionInput)

Declaration
public SelectionInput(SelectionInput other)
Parameters
Type Name Description
SelectionInput other

Properties

ExternalDataSource

An external data source, such as a relational data base.

Declaration
public Action ExternalDataSource { get; set; }
Property Value
Type Description
Action

Items

An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.

Declaration
public RepeatedField<SelectionInput.Types.SelectionItem> Items { get; }
Property Value
Type Description
RepeatedField<SelectionInput.Types.SelectionItem>

Label

The text that appears above the selection input field in the user interface.

Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".

Declaration
public string Label { get; set; }
Property Value
Type Description
string

MultiSelectDataSourceCase

Declaration
public SelectionInput.MultiSelectDataSourceOneofCase MultiSelectDataSourceCase { get; }
Property Value
Type Description
SelectionInput.MultiSelectDataSourceOneofCase

MultiSelectMaxSelectedItems

For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.

Declaration
public int MultiSelectMaxSelectedItems { get; set; }
Property Value
Type Description
int

MultiSelectMinQueryLength

For multiselect menus, the number of text characters that a user inputs before the app queries autocomplete and displays suggested items in the menu.

If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.

Declaration
public int MultiSelectMinQueryLength { get; set; }
Property Value
Type Description
int

Name

The name that identifies the selection input in a form input event.

For details about working with form inputs, see Receive form data.

Declaration
public string Name { get; set; }
Property Value
Type Description
string

OnChangeAction

If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form.

For details about working with form inputs, see Receive form data.

Declaration
public Action OnChangeAction { get; set; }
Property Value
Type Description
Action

PlatformDataSource

A data source from Google Workspace.

Declaration
public SelectionInput.Types.PlatformDataSource PlatformDataSource { get; set; }
Property Value
Type Description
SelectionInput.Types.PlatformDataSource

Type

The type of items that are displayed to users in a SelectionInput widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.

Declaration
public SelectionInput.Types.SelectionType Type { get; set; }
Property Value
Type Description
SelectionInput.Types.SelectionType
In this article
Back to top Generated by DocFX