Domo Brick export to pdf
Hi everyone,
I have created a Domo Brick which shows a dropdown that is dynamically populated based on data from a dataset. The idea is that you select a value and it filters the whole dashboard. This works well and when I try to export the page as a pdf it shows all charts correctly filtered based on the current selection but the dropdown itself is shown with its initial value, not the currently selected on. This may confuse users since they select 'B' and then on the pdf the dropdown is telling them everything is filtered by selection 'A' while in truth the charts on the pdf are filtered by 'B'.
Hope that makes sense and someone may have an idea to resolve this.
Thanks
Thomas
Best Answer
-
Update:
I figured it out:
domo.onFiltersUpdate(result => {dropdown.value = result[0].values[0];});
onFiltersUpdate will block the page filter from filtering my brick (which I want) + I can manually pick what the selected value is (result[0].values[0] works for me since I can only have one selection). Had to enable filtering on the brick for this to work.
0
Answers
-
It sounds like the PDF export process is capturing the initial value rather than its current state. I assume it is because the displayed value isn’t persisting its selection. You could try making sure there's a persisting variable tied to the dropdown. Make sure the dropdown value is explicitly updated and reflected in the rendered output of the component.
You could try to explicitly display the selected value in the dropdown before exporting, by overriding the dropdown dynamically based on the applied filter.
dropdown.value = FilterValue;
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Thanks for the suggestion. Unfortunately it does not work.
I think I understand what is happening here: My dropdown updates the global filter. So when the pdf is created it picks up the global filter and applies it to the dashboard. However, I set the brick to not be filtered by the global filter (otherwise selecting something from the dropdown will limit my dropdown choices to the one I selected). In any case, the global filter does not apply to the brick and therefore the pdf will show the initial state of the brick instead. I am wondering if there is anything else I could do.
0 -
Update:
I figured it out:
domo.onFiltersUpdate(result => {dropdown.value = result[0].values[0];});
onFiltersUpdate will block the page filter from filtering my brick (which I want) + I can manually pick what the selected value is (result[0].values[0] works for me since I can only have one selection). Had to enable filtering on the brick for this to work.
0 -
Sounds great. Good job.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive