Expand all | Collapse all

Custom Home Page Widgets

  • 1.  Custom Home Page Widgets

    Posted 10-12-2017 17:05
    Has anyone had success with creating their own custom widgets for the standard Quickbase Home Page?

    I would like to add buttons on the home page that:
    1. Serves as a link to a specific report
    2. Shows the total number of records in said report


    Thank you,

  • 2.  RE: Custom Home Page Widgets

    Posted 10-12-2017 17:08
    In the settings of a homepage you can create a button bar. Those buttons can go to a link, report, or page. If you wanted to add a count or run any query on the home page and add that to the button you may need custom code. 

  • 3.  RE: Custom Home Page Widgets

    Posted 10-12-2017 17:22
    Thank you Chuck,

    I think a custom code option is the way to go.

    I have successfully embedded an HTML page on the Quickbase home page that includes the buttons I want.

    Where I am having difficulties is with using the response from API_GetNumRecords.

    After that I then have to figure out how to apply a filter to the API call.

    Any experience?

  • 4.  RE: Custom Home Page Widgets

    Posted 10-12-2017 17:38
    Ok I think you just want to use API_DoQuery instead of API_GetNumRecords. That will just return the total records of a table. An example is below though it's not tested. For Query or (q) in the code. You would place something like this given 25 is the field ID for a field called status and one of the values is Open
    var q = "{25.EX.'Open'}"
                        $.get(dbidTracts, {
                            act: "API_DoQuery",
                            query: q,
                            clist: clist
                        }, function(xml) {
    $("#openBtn").html("Open Tickets (" +xml.length + ")");

    You're welcome to reach out directly if you have any questions with custom coding issues. Chuck@Chuck.Support or if this solution resolves your issue and you're feeling gratuitous , chuck.support/donate

    Take care and good luck! 

  • 5.  RE: Custom Home Page Widgets

    Posted 10-12-2017 17:54
    Hello Chuck,

    I have tried experimenting with this but am not sure I know where to start. Were is the table referenced in this code?

  • 6.  RE: Custom Home Page Widgets

    Posted 10-12-2017 17:59
    In this example its called dbidTracts which is just a variable so you can just go to your table, copy the ID from the URL and use that instead or store it in a variable like I did.

    I don't know your level of coding so I'm not sure what all you would need help with. For the query code you would also wrap that in <script></script> tags if you enter it in your HTML that's loading the buttons.

  • 7.  RE: Custom Home Page Widgets

    Posted 10-12-2017 18:19
    I thought my coding skills were adequate until trying to figure this out.

    Should I be saving this in an .HTML file?
    How do I use the value of xml.length?
    Why use an openBtn instead of a "<a>" tag?

  • 8.  RE: Custom Home Page Widgets

    Posted 10-12-2017 18:25
    You could use <a> and style it or use <button> the styling is just CSS.  You said you had the HTML already with the buttons you wanted. I don't know if you're using <button> or <a> though it doesn't matter. As long as the element has an ID called "openBtn" or something else. $("#openBtn") is jQuery and grabs the element. the .HTML("Some button name") is the info between the tags <button>Some button Name</button>

    Not sure I can provide any more help without charging unfortunately. Though I could show you how I do it if you want to learn I can just do one button and you could basically copy/paste for as many buttons as you want.

  • 9.  RE: Custom Home Page Widgets

    Posted 10-12-2017 18:32
    Let's talk offline