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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive