Filter bar custom buttons in the classic Workbook Editor
This page describes the classic Workbook Editor.
A custom button in the filter bar starts an action when a viewer selects it. The filter bar appears on every sheet, so a button there is available in the same place on all of them.
Adding a button to the filter bar
Section titled “Adding a button to the filter bar”-
With the workbook in edit mode, select the filter bar.
-
In the settings panel, expand Custom buttons at the bottom.

-
Select the plus icon to add a button.
-
Set the button’s properties:

- Name: the name the action blocks use to recognise the button. It does not have to be unique: buttons on different sheets with the same name run the same actions.
- Label: the text shown on the button.
- Show icon: whether the button shows an icon.
The button appears on the right of the filter bar.
Defining the actions for a filter bar button
Section titled “Defining the actions for a filter bar button”Every custom button in the filter bar emits its events from the filter bar, so one When block handles all of them. Inside it, compare the Custom button name event parameter with a button’s name to decide what each button does.
-
Open the Actions module.
-
Add a When block and pick Filter Bar as the object.

-
Pick the event, such as On click, and add an If block inside the When block.

-
In the If condition, put a Select event parameter block on one side and pick Custom button name from its dropdown. On the other side, put the button name to compare it with, such as
Smart_Button.
Example: a different action per button
Section titled “Example: a different action per button”In this action, When Filter Bar emits On click checks whether Custom button name equals Smart_Button. If it does, the action applies a filter on the club_name field of ClubDim. For any other button, the Else branch goes to the sheet Highlights | Sales.
Example: the same action for every button
Section titled “Example: the same action for every button”To run the same blocks whichever button is selected, check only that Custom button name is not null. In this action, any named button sets the variable vCalendarName to the sheet name followed by - Calendar, clears the filters on the date_field field of Date_List, and makes an object visible.
For the events the filter bar emits and its event parameters, see When [Filter bar] emits [Event type] do. For the filter bar’s other settings, see Filter Bar.


