Dynamic/Auto Update Text Card?

Options

Hello, is there a way to have a text card that randomly selects/displays one sentence from a dataset with multiple/different sentences. For example, say the dataset has motivational quotes like "Today's the day!" or "Always Be Curious!". I want to create a text box that would randomly select one of these quotes and display it on the dashboard and then either select/display a new quote upon refresh of the dashboard or refresh/select a new quote after a few minutes of being on the dashboard regardless of the dashboard being refreshed.

Hope that makes sense. Thanks in advance!

Best Answer

  • ColemenWilson
    edited August 2023 Answer ✓
    Options

    You could create a slideshow of quotes:
    https://domo-support.domo.com/s/article/360043437793?language=en_US

    Or you could do this:

    1. create a data table with 2 columns: Quotes, numbers 1-59.
    2. Use this case statement as a filter on the card with "In" selected:
      1. MAX(CASE WHEN Number = MINUTE(CURRENT_TIME()) THEN 'In' ELSE 'Out' END)
    3. Make the card a text card

    The card will display a new quote every minute.

    I attempted something similar using RAND() to be truly random but it was kind of buggy. I think the minute is a cleaner solution and cycles through the quotes nicely.

    If I solved your problem, please select "yes" above

Answers

  • ColemenWilson
    edited August 2023 Answer ✓
    Options

    You could create a slideshow of quotes:
    https://domo-support.domo.com/s/article/360043437793?language=en_US

    Or you could do this:

    1. create a data table with 2 columns: Quotes, numbers 1-59.
    2. Use this case statement as a filter on the card with "In" selected:
      1. MAX(CASE WHEN Number = MINUTE(CURRENT_TIME()) THEN 'In' ELSE 'Out' END)
    3. Make the card a text card

    The card will display a new quote every minute.

    I attempted something similar using RAND() to be truly random but it was kind of buggy. I think the minute is a cleaner solution and cycles through the quotes nicely.

    If I solved your problem, please select "yes" above

  • Jason Is Curious
    Options

    Thank you @colemenwilson for your response. I'm stuck on step 2 where I copied your statement into a beast mode and then used that beast mode as a filter for the text card but I only get "Out" as a filter value selection. Do you happen to have an idea why "In" wouldn't show up as an option?

  • ColemenWilson
    Options

    Hmm the only time that should happen is if, for example, the current time is 3:49 but there is no quote in your data with 49 as the number value. Could you screenshot your beastmode formula? It is still working for me so I am not sure what is going on.

    If I solved your problem, please select "yes" above

  • Jason Is Curious
    Options

    Yup, here is the beast mode:

  • ColemenWilson
    Options

    Hi Jason,

    Apologies on the delayed response - I have been out of office. I would be happy to jump on a quick call with you to troubleshoot why this isn't working for you. If you'd like to, you can schedule a time here:
    https://calendly.com/cwilsondomo

    If I solved your problem, please select "yes" above

  • MichelleH
    Options

    @JasonNgaiGPT The MAX around your beast mode is only returning the option that is last in the alphabet, in this case "Out". Try removing the max to see if that gives you the "In" option.

  • @JasonNgaiGPT were you able to get this working?

    If I solved your problem, please select "yes" above