Custom Home Page Widgets

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
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,
Photo of William

William

  • 142 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
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. 
Photo of William

William

  • 142 Points 100 badge 2x thumb
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?
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
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.
Photo of William

William

  • 142 Points 100 badge 2x thumb
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?
Photo of Chuck Grigsby

Chuck Grigsby

  • 1,978 Points 1k badge 2x thumb
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.
Photo of William

William

  • 142 Points 100 badge 2x thumb
Let's talk offline