Class ModifyCard

Modify Card

A builder for Modify Card objects that changes and updates an existing card's interface by passing the Modify Card object to a Action . For usage, see Update configuration cards .

Only available for Google Workspace add-ons that extend Google Workspace Studio.

Sample usage:

 const 
  
 insertSection 
  
 = 
  
 AddOnsResponseService 
 . 
 newInsertSection 
 (). 
 insertBelowSection 
 ( 
 'sample_id' 
 ) 
 . 
 setSection 
 ( 
 CardService 
 . 
 newCardSection 
 (). 
 setHeader 
 ( 
 'New Section' 
 )); 
 const 
  
 modifyCard 
  
 = 
  
 AddOnsResponseService 
 . 
 newModifyCard 
 (). 
 setInsertSection 
 ( 
 insertSection 
 ); 
 const 
  
 navigation 
  
 = 
  
 AddOnsResponseService 
 . 
 newNavigation 
 (). 
 addModifyCard 
 ( 
 modifyCard 
 ); 

Methods

Method Return type Brief description
Modify Card Sets the Insert Section for this modify card object.
Modify Card Sets the Insert Widget for this modify card object.
Modify Card Sets the Remove Section for this modify card object.
Modify Card Sets the Remove Widget for this modify card object.
Modify Card Sets the replacement Card Section for this modify card object, the replacement section should have the same id as an existing card section.
Modify Card Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.
Modify Card Sets the Update Widget for this modify card object.

Detailed documentation

set Insert Section(insertSection)

Sets the Insert Section for this modify card object.

Parameters

Name Type Description
insert Section
Insert Section The insert section to apply to the card.

Return

Modify Card — This modify card object, for chaining.


set Insert Widget(insertWidget)

Sets the Insert Widget for this modify card object.

Parameters

Name Type Description
insert Widget
Insert Widget The Insert Widget to apply to the card.

Return

Modify Card — This modify card object, for chaining.


set Remove Section(removeSection)

Sets the Remove Section for this modify card object.

Parameters

Name Type Description
remove Section
Remove Section The Remove Section to apply to the card.

Return

Modify Card — This modify card object, for chaining.


set Remove Widget(removeWidget)

Sets the Remove Widget for this modify card object.

Parameters

Name Type Description
remove Widget
Remove Widget The Remove Widget to apply to the card.

Return

Modify Card — This modify card object, for chaining.


set Replace Section(replacementSection)

Sets the replacement Card Section for this modify card object, the replacement section should have the same id as an existing card section.

Parameters

Name Type Description
replacement Section
Card Section The replacement section to overwrite an existing card section.

Return

Modify Card — This modify card object, for chaining.


set Replace Widget(replacementWidget)

Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.

Parameters

Name Type Description
replacement Widget
Widget The replacement widget to overwrite an existing widget.

Return

Modify Card — This modify card object, for chaining.


set Update Widget(updateWidget)

Sets the Update Widget for this modify card object.

Parameters

Name Type Description
update Widget
Update Widget The Update Widget to apply to the card.

Return

Modify Card — This modify card object, for chaining.

Design a Mobile Site
View Site in Mobile | Classic
Share by: