Buttons, Buttons, Buttons - (new code for all!)
Sorry I haven't gotten around to putting out some nice code goodies, but today is a new day full of buttons for you. So here you go!
"<a class='Vibrant Snowy SaveBeforeNavigating' href='https://mysite.quickbase.com/db/tableIDhere?a=dbpage&pageID=12&ifv=10'>Save & Logout</a>"
This next little bit of code really can be used for any link or button, and is a life saver for those of us dealing with the EOTI role.
This is a special encoding that QB can understand. I have it here encoding the Record ID#, but you can use it for any number.
ENCODING: &r=" & QB32Encode( [Record ID#])
URLRoot() & "db/" & [_dbid_table] & "?a=dr&r=" & QB32Encode( [Record ID#])
Have you ever just wanted to click a button and save something as a csv? Yeah, me too. So I did.
This one can take a bit of set up (or not) depending on if you want to download a filtered report or not.
First I make a report (qid=59 in this case), then I make a bunch of "ask the user" filters (V0, V1, V2,...). This would be a filter where you would say, filter by Shirt Size and instead of putting 'equals Red' in the report, you would put 'equals <ask the user>'. Then you would put whatever you were wanting to filter for the report into the code below. This is great for dynamic reports.
But back to the CSV. As you can see on the end, there is '&options=csv'. It really is that easy. Just plop this is a URL Formula Field and make yourself a button.
https://myebsite.quickbase.com/db/tableID?a=API_GenResultsTable&qid=59&nv=3&v0=MyFirstFilter&v1=MyNextFilter&v2=MyOtherFilter&options=csv
The key is the 'Key' field. Below I have an example of a button that saves what the applicant is working on in one form and then navigates them to edit their parent record by looking up their email. In the parent table, the Key is Applicant Email, so it can use the Applicant Email Address from the child table (the application that they are working on) to find the parent profile record. Just throw this button into a Rich Text Field and you're done.
"<a class='Vibrant Success SaveBeforeNavigating' href='https://mywebsite.quickbase.com/db/tableID?a=er&key="&URLEncode([Applicant Email Address*])&"&ifv=10'>Edit Applicant Profile</a>"
And last of all, a nice list of the "Vibrant" button set:
List(" ",
"<a class='Vibrant'>Vibrant</a>", // regular grey button
"<a class='Vibrant Alert'>Vibrant Alert</a>", // yellowish
"<a class='Vibrant Danger'>Vibrant Danger</a>", // red
"<a class='Vibrant Primary'>Vibrant Primary</a>", // blue
"<a class='Vibrant Snowy'>Vibrant Snowy</a>", // white
"<a class='Vibrant Success'>Vibrant Success</a>" // also blue, but they clain green
)
Super Secret Bonus Code:
background-image: linear-gradient(220deg, #1e6fb7 50%, #5086b5 80%);
------------------------------
QuickBase Girl
------------------------------