Forum Discussion

YobaniMaldonado's avatar
Qrew Member
2 years ago

Display daily safety message on Quickbase home page.

I am wondering if there is a way to display a record that is tabled within the App as text on the App's homepage. I have a table called "Daily Safety Message" where each day there is a different message. Currently I am running a report that filters the current days message and I just simply display that report on the homepage. However, I'm wondering if there is a way to display that message in text format on the homepage?

Yobani Maldonado

2 Replies

  • Maybe not the best or easiest way to do it but this is the first way that popped into my head.

    Create a second table called "Today's Message" or something similar.  Create a single record in this table.  Then add a relationship between the Daily Safety Message table and the Today's Message table where Daily Safety Message is the parent.  Add the fields that you want to display on the homepage as lookup fields on the Today's Message table.

    Make the form for the Today's Message table look the way you want it to appear on the homepage.  I'd probably remove the built-in fields if I were doing this myself.

    On the homepage, add a webpage widget.  The url should be (yourdomain)'sMessageDBID)?a=dr&rid=1&ifv=1

    The &ifv=1 will display just the record without the rest of the Quickbase page.  You can change the 1 to a larger number if you want to add some padding on the left of the form.

    Then create a scheduled pipeline that runs every day at 12AM.  The pipeline should look up the record in the Daily Safety Message table with today's date, and then update the single record in the Today's Message table so that the "Related Daily Safety Message" field is equal to the Record ID# of the Daily Safety Message with today's date.

    To find the Daily Safety Message with today's date, you can use Jinja in the pipeline.  A non-Jinja alternative is to just create a formula checkbox field that says if([Date]=today(),true,false) and use that field in your pipeline instead.

    Tyler Jablonski
    • TylerJablonski1's avatar
      Qrew Trainee
      Another possible solution is using an HTML code page that just has an iframe element in the body.  Then in the head includes some Javascript that finds the Record ID# of that day's message using the API, then assigns the src attribute of the iframe to the correct URL based on the Record ID#.  Then you can embed that code page as a webpage widget.

      That's probably a more elegant solution as it doesn't require a second table or a pipeline, but you would need to be comfortable using HTML and Javascript and working with the API.

      Tyler Jablonski