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.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