Skip to main content
All CollectionsWorkbook Editor
Filter Bar - Custom Buttons
Filter Bar - Custom Buttons
Piers Batchelor avatar
Written by Piers Batchelor
Updated over 2 months ago

Introduction

The button helps build interactive guided analytics data apps.
Buttons can trigger a process that combines several actions to help users uncover insights.
Placing the button in the filter bar simplifies the user experience as buttons are placed in the same place across all sheets in the workbook.

Another benefit is that buttons on different sheets can trigger the same action process.



Adding a Button to the Filter Bar

  • click on the filter bar when the workbook is in edit mode.

  • From the menu, expand the custom buttons section at the bottom.

  • Click on the plus icon to add a new button.

  • Define these properties for the button:

    • Name- This name will later be used in the action blocks,
      The name isn't unique, and having buttons in different sheets with the same name buttons will trigger the same actions.

    • Label- The label can be set by static text or a variable.

    • Icon- Define if the button will have an icon and which icon.

  • The button will appear in the filter bar on the right side.


Defining the Actions for a filter bar Button.

  • Open the Actions module.

  • Add a When action block and select the Filter Bar option.
    (All the buttons that are added to the filter bar use this action)

  • Add an If statement block inside the When action block

  • In the if statement, add a condition that references the button name defined in the previous section.
    On one side of the condition, there is the "select event parameter" action block from the drop-down select custom button name

    On there other the value to compare to.

  • The example below shows how the action blocks works.

    In the above example, if the button name is Smart_button then a filter is applied,
    For all other buttons, a navigation to a sheet will happen

  • The example below shows how to define an action for all buttons in the filter bar regardless of their name. (This is useful when the use case is to get the same action on all sheets in the app.)

    In the above example, as long as the button has a name,
    A selection is applied and an object is shown on the screen.

Did this answer your question?