Class PlatformDataSource

プラットフォームデータソース

マルチ選択メニューを使用する SelectionInput ウィジェットの場合は、Google Workspace のデータソース。複数選択メニューの項目に入力する場合に使用します。

const platformDataSource =     CardService.newPlatformDataSource().setCommonDataSource(         CardService.CommonDataSource.USER,     );  const multiSelect = CardService.newSelectionInput()                         .setType(CardService.SelectionInputType.MULTI_SELECT)                         .setFieldName('contacts')                         .setTitle('Selected contacts')                         .setMultiSelectMaxSelectedItems(5)                         .setMultiSelectMinQueryLength(1)                         .setPlatformDataSource(platformDataSource);

Google Chat アプリでのみ使用できます。Google Workspace アドオンには使用できません。

メソッド

メソッド戻り値の型概要
setCommonDataSource(commonDataSource)PlatformDataSourceGoogle Workspace からデータソースを設定します。
setHostAppDataSource(hostAppDataSource)PlatformDataSource複数選択メニューのスペースに入力するために使用されます。

詳細なドキュメント

setCommonDataSource(commonDataSource)

Google Workspace のデータソースを設定します。

const platformDataSource =     CardService.newPlatformDataSource().setCommonDataSource(         CardService.CommonDataSource.USER,     );  const multiSelect = CardService.newSelectionInput()                         .setType(CardService.SelectionInputType.MULTI_SELECT)                         .setFieldName('contacts')                         .setTitle('Selected contacts')                         .setMultiSelectMaxSelectedItems(5)                         .setMultiSelectMinQueryLength(1)                         .setPlatformDataSource(platformDataSource);
Google Chat アプリでのみ使用できます。Google Workspace アドオンには使用できません。

パラメータ

名前説明
commonDataSourceCommonDataSource設定するデータソース。

戻る

PlatformDataSource - チェーン用のこのオブジェクト。


setHostAppDataSource(hostAppDataSource)

複数選択メニューのスペースに入力するために使用されます。

const chatSpaceDataSource =     CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);  const chatClientDataSource =     CardService.newChatClientDataSource().setSpaceDataSource(         chatSpaceDataSource);  const hostAppDataSource =     CardService.newHostAppDataSource().setChatDataSource(chatClientDataSource);  const platformDataSource =     CardService.newPlatformDataSource().setHostAppDataSource(hostAppDataSource);  const multiSelect = CardService.newSelectionInput()                         .setType(CardService.SelectionInputType.MULTI_SELECT)                         .setFieldName('contacts')                         .setTitle('Selected contacts')                         .setMultiSelectMaxSelectedItems(5)                         .setMultiSelectMinQueryLength(1)                         .setPlatformDataSource(platformDataSource);
Google Chat アプリでのみ使用できます。Google Workspace アドオンには使用できません。

パラメータ

名前説明
hostAppDataSourceHostAppDataSource設定するデータソース。

戻る

PlatformDataSource - チェーン用のこのオブジェクト。