Send parameters to custom cards
I'm developing a custom card, and I'd like to be able to have the card have some of the same abilities as standard Domo cards. Is there any way to send a parameter to the custom javascript code from Domo?
Specifically I have two use cases: First, I would like the title/header of the card to dynamically re-size based on whether it's viewed in a medium box (1x1 card size) or full size. Standard Domo cards adjust their font size automatically so that it shrinks to a 7 or 8 point font when in medium box size, so that you can read them, but grows to an 11 or 12 point font at full size. I could envision this either being a parameter sent to the custom app through domo, or else some sort of .css command that would allow this to auto-resize.
Secondly, I'd like to be able to allow users to filter the data using Domo's filtering. Is there some way to declare to Domo that certain datasets used by the card are filterable, and then to send the filter results as a parameter to the custom card?
thanks!
Best Answer
-
Hello,
I would recommend using a %. Assign sizes as xx%. As the screen size changes the elements will also change to stay the same size ratio.
In my apps, I use the filter that is available when calling datasets from domo. I create a drop-down filter or something similar and use the API to control the filtering: https://developer.domo.com/docs/dev-studio-references/data-api#filter**Say “Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Answers
-
Hello,
I would recommend using a %. Assign sizes as xx%. As the screen size changes the elements will also change to stay the same size ratio.
In my apps, I use the filter that is available when calling datasets from domo. I create a drop-down filter or something similar and use the API to control the filtering: https://developer.domo.com/docs/dev-studio-references/data-api#filter**Say “Thanks" by clicking the thumbs up in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"0
Categories
- All Categories
- 1.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 709 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive