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

  • Gimli
    Gimli Domo Employee
    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"

Answers

  • Gimli
    Gimli Domo Employee
    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"
This discussion has been closed.