add_button
Add a button to a Power BI report page with configurable actions for bookmarks, page navigation, drillthrough, Q&A, web links, and slicers. Specify label and action type to get the new visual ID.
Instructions
Add a BUTTON with any action: actionType = bookmark | back | pageNavigation | drillthrough | qna | webUrl | clearAllSlicers | applyAllSlicers. bookmark needs bookmarkName; pageNavigation/drillthrough need a destination page (in destinationOrUrl); webUrl needs a url (in destinationOrUrl); back/qna/clearAllSlicers/applyAllSlicers need neither (clearAllSlicers/applyAllSlicers act on the page's slicers, e.g. a native Clear-all-slicers button). Writes the actionButton visualLink the product uses. Returns the new visual id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| page | Yes | page name or displayName to place the button on | |
| text | Yes | button label | |
| width | No | ||
| height | No | ||
| actionType | No | bookmark | back | pageNavigation | drillthrough | qna | webUrl | clearAllSlicers | applyAllSlicers | bookmark |
| bookmarkName | No | bookmark name (actionType=bookmark) | |
| reportSessionId | Yes | ||
| destinationOrUrl | No | destination page (pageNavigation/drillthrough) OR url (webUrl) |