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
Categories
- 10.8K All Categories
- 3 Private Company Board
- 1 APAC User Group
- 12 Welcome
- 39 Domo News
- 9.7K Using Domo
- 1.9K Dataflows
- 2.5K Card Building
- 2.2K Ideas Exchange
- 1.2K Connectors
- 343 Workbench
- 260 Domo Best Practices
- 11 Domo Certification
- 464 Domo Developer
- 50 Domo Everywhere
- 105 Apps
- 714 New to Domo
- 85 Dojo
- Domopalooza
- 1.1K 日本支部
- 4 道場-日本支部へようこそ
- 27 お知らせ
- 64 Kowaza
- 299 仲間に相談
- 653 ひらめき共有