Formula Fields on Dashboard Button

  • 0
  • 1
  • Question
  • Updated 3 months ago
  • In Progress
Hello,

Is there anyway to add dynamic formula fields to a dashboard URL button.  Basically if I want to have a add new record button on a dashboard that fill in certain fields with the current year and current date what would my URL button look like.  

As a note I know I could just create a table with one record and this button on the record which would work fine.  

Thanks.
Photo of Jacob

Jacob

  • 738 Points 500 badge 2x thumb
  • Interested

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
Jacob, you would just need to make the custom URL, with whatever extra fields you'd need.  Then past that into a standard button as a "URL" then change the text to whatever you'd like.

Ask Eric about it next time, and he can show you.
Photo of Jacob

Jacob

  • 738 Points 500 badge 2x thumb
Hey Matt,

Sure thing.  My button works great for fields that are static and need to be filled in with the same thing each time. Here is my custom URL button on my dashboard.  Field 23 fills in great but I am not sure I will be able to fill in field 59 with the current month and year.  Is that possible to have a formula in a URL button on a dashboard.  Once again I could very easily create a table with one record and then just put that on the dashboard in a report but I am interested to see if this is possible.


hostname.quickbase.com/db/bmueut4ne?a=API_AddRecord&_fid_23=Monthly Commentary&_fid_59= [Current Month][Current Year]&disprec=1


Any thoughts? 
Thanks.
Photo of Sam C

Sam C

  • 222 Points 100 badge 2x thumb
Matt,

Date fields can be filled in automatically without the need to do so via a button if that's all you need.

If you go to the field properties of "fid 59" you can set it to have a default value == today.

If you specifically want it to be just the month or the year, you could also do this using formula date fields. 

  1. Make your date field (could probably just use the built-in field Date Created)
  2. Make two new formula date fields: "Current Month" and "Current Year"
  3. Write formulas to only display the piece of that that you want. For example, "Current Year" would be:  Year( [Date Created] )
To answer your question about custom formula buttons on the dashboard, I don't believe this is possible using standard QuickBase methods. You would have to dig into some more elaborate Javascript methods to do this.
(Edited)
Photo of Paul Vorster

Paul Vorster

  • 556 Points 500 badge 2x thumb
It is late in the afternoon, and I am battling a bit...this is exactly what i am looking for, but just cant find the place to insert it on my dashboard? Can you assist?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,316 Points 50k badge 2x thumb
You cannot do this on a regular dashboard buttons as they just accept a static URL, but not a formula.

My solution in these cases is to create a table for this purpose with just one record in it and perhaps just one field.  Then put a report of that record on the dashboard and try to have the report be just 1/3rd of the width of the dashboard so it does not look silly being a full width report with one lonely field.