Add a button to open a specific form?
I have a table that everyone has access to. Lets call it "Products". For the purposes of this discussion, every role has the same access. I want to be able to add products through two separate buttons on the home page. The first is already there. It takes us to our current add form. We want to keep this. The second, is not. Right now we have it set up on the current add form through dynamic form rules, but you have to answer about 3 different drop downs before you get to it and it is confusing to users. What I want is to have a second button, that when clicked, takes you to a different form I have created to add these specific products. It would be the same for every role. Is this possible, without setting form rules with the roles? Every role would need access to both. ------------------------------ mtn mtn ------------------------------299Views0likes3CommentsClose a pop up form after a button is clicked on the form
I have a button that sits on a report that is on a user page that creates pop up to a special form that also has a button that that acts on a checkbox and then refreshes the page. Here is my formula that sits on the pop up form: var text Update = URLRoot() &"db/" & Dbid() & "?act=API_EditRecord"& "&rid=" & [Record ID#] & "&_fid_1046=1"; var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl(); If([Ready for Dispositions]=false,$Update & "&rdr=" & URLEncode($RefreshPage)) What do I need to add to my formula to close the pop up after the button is clicked? ------------------------------ George Bramhall ------------------------------200Views0likes16CommentsFormula-URL button with API_AddRecord, then API_EditRecord (need to edit the record just added)
I am working with two tables: Parent Table: Work Orders Child Table: Status History I have a formula-URL button that is supposed to do multiple things: Add a record in the Status History table: [Type]=Work Order Status, [Status]=Closed, [Status Changed By]=Current User If [QC/QA Status] Contains "QC/QA Fail", then Add a record in the Status History table: [Type]=QC/QA Status, [Status]=Revision Complete - QC/QA Needs Review, [Status Changed By]=Current User Open Code Page 9, Prompt User for Comments, then Edit the record added in step 2 by populating [QC/QA: Work Order Review/Revision Comments] with User Prompted Input. Everything works perfectly, except the User Prompted Input doesn't populate the [QC/QA: Work Order Review/Revision Comments] field on my Status History record (created in Step 2). I've tried including a formula query (as a variable) and referencing it in my formula to use as the Record ID from the record added in Step 2 above but it didn't work. Then I tried using another formula field [Max QC/QA RID for Comments], which I created on the Work Order form to run the query and I referenced it in my formula to use as the RID but it didn't work. I guess the API-EditRecord isn't working which I can only speculate it's related to the Record ID? Does anyone know if there is a better way to do this? Here is a link to the code page I used: Code Pages - PromptAndRefresh.html (quickbase.com) Here is my formula below: var bool show = If(Contains([W/O Status],"Received") or Contains([W/O Status],"Created") or Contains([W/O Status],"Dispatched")or Contains([W/O Status],"Pending Review") or Contains([W/O Status],"Pending Revision"),true,false); var bool QCQAFail= If(Contains([QC/QA Status],"QC/QA Fail"),true,false); var text WOStatus= URLRoot() & "db/" & [_DBID_STATUS_HISTORY] & "?a=API_AddRecord&_fid_6=" & URLEncode ([Record ID#]) & "&_fid_10=Closed" & "&_fid_11=Work Order Status" & "&_fid_9=" & URLEncode(User()) & "&apptoken=xxxxxxxxx"; var text QCQAStatus= URLRoot() & "db/" & [_DBID_STATUS_HISTORY] & "?a=API_AddRecord&_fid_6=" & URLEncode ([Record ID#]) & "&_fid_10=Revision Complete - QC/QA Needs Review" & "&_fid_11=QC/QA Status" & "&_fid_9=" & URLEncode(User()) & "&apptoken=xxxxxxxxx"; //var Text qcqaID = ToText(GetFieldValues(GetRecords("{10.EX.'Revision Complete - QC/QA //Needs Review'} AND {6.EX."&[Record ID#]&"}",[_DBID_STATUS_HISTORY]),3)); //var text MAXID= //ToText(Max(ToNumber(Part($qcqaID,1,";")), //ToNumber(Part($qcqaID,2,";")), //ToNumber(Part($qcqaID,3,";")), //ToNumber(Part($qcqaID,4,";")), //ToNumber(Part($qcqaID,5,";")), //ToNumber(Part($qcqaID,6,";")), //ToNumber(Part($qcqaID,7,";")))); //var Number MAXID= //Max(ToNumber(Part($qcqaID,1,";")), //ToNumber(Part($qcqaID,2,";")), //ToNumber(Part($qcqaID,3,";")), //ToNumber(Part($qcqaID,4,";")), //ToNumber(Part($qcqaID,5,";")), //ToNumber(Part($qcqaID,6,";")), //ToNumber(Part($qcqaID,7,";"))); var text urlToExecute = URLRoot() & "db/" & [_DBID_STATUS_HISTORY] & "?a=API_EditRecord&apptoken=" & "&apptoken=xxxxxxxxx" & "&rid=" & [Max QC/QA RID for Comments] & "&_fid_28="; // Field to Populate with the user prompted input var text Page= URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=9" // Open code page 9 & "&url=" & URLEncode($urlToExecute); // Pass in the URL to execute var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl(); var text DoBoth= $WOStatus & "&rdr=" & URLEncode($QCQAStatus) & URLEncode("&rdr=" & URLEncode($Page)) & URLEncode("&rdr=" & URLEncode("&rdr=" & URLEncode($RefreshPage))); var text DoOne= $WOStatus & "&rdr=" & URLEncode($RefreshPage); If($show=true and $QCQAFail=true, $DoBoth, $show=true, $DoOne,"") Any help or advise would be much appreciated! Thanks, ------------------------------ Aleisha Aldrich ------------------------------200Views0likes0CommentsPossible to download a report as a csv (or xls) with a button push?
I have a button that allows a user to open a report, and then if they want save as spreadsheet. Is there any way the button can download the report as a spreadsheet automatically? ie, skip the go the the report stage? Essentially, I want my users to be able to download a template, but this template isnt static. It may change periodically based on data in the system, so I can't simply upload a template file. Also, I want the user to get the template on demand, so I can't set it up as a subscription. Ideas? ------------------------------ Mike Tamoush ------------------------------200Views1like4CommentsSave and Keep Working behavior in a Custom button
The native behavior of Save & Keep Working will save Both the edit made to embedded child records and whatever changes made in the form to the parent record. The code below Does Not do that. I found the below at: Alternatives to common JavaScript Insertion techniques var text rid = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%"); var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid; "<a class=\"Vibrant Primary SaveBeforeNavigating\" data-replaceRid=\"true\" href=\"" & $url & "\">Save & Keep Working - Rich Text</a>" My endeavor is to have a Custom Button behave the same way as the Native "Save & Keep Working" button. Save both parent and child record edits, redisplay in edit mode. Why a custom button? you may ask. Because the other options "Save & Close" and "Save & Next" I do not want to be available to the end user. Any assistance is appreciated. Thank you, CGreene ------------------------------ Christopher Greene ------------------------------200Views0likes8CommentsButtons, Buttons, Buttons - (new code for all!)
Hello 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! This basic gray button saves your work and then sends you to a code page. - It is good for saving and then a thank you page or you can alter it to go to another form. Just plop it in a Rich Text Formula Field and you are ready to go. Pretty slick. "<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 Looking for an alternative to using the Record ID# in your links / buttons. Yeah, who wants to use the Record ID# when your key field is your email? I sure don't, and I'm just lazy enough to make it work. 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: Gradient Background (can be used in buttons and code pages!) background-image: linear-gradient(220deg, #1e6fb7 50%, #5086b5 80%); ------------------------------ QuickBase Girl ------------------------------199Views2likes1CommentRedirecting back to the current form after executing a formula url button
Hello, I have a few buttons that at the end redirect the user after execution the action to the "default" form for the table. How do I change this so the redirect goes to the current form the user is on? The button is on multiple forms and I want to redirect them back where they came from. Thanks! ------------------------------ Ivan Weiss ------------------------------199Views0likes6CommentsRedirects
I was wondering if someone can clarify how the different redirects work/are used. & "&z=" & Rurl() //This bit of magic will always return you to where you launched?? Can be used any time, or there are specific scenarios? & "&rdr=" & URLEncode(URL) //This seems to be the most literal version. You simply tell it exactly where to redirect? And can be used for nested redirects? //Below: this javascript seems to return you from where you launched? How does it differ from the first bit of code, and when do you use this javascript versus the first magic code? "javascript:" & "$.get('" & $URL & "',function(){" & "location.reload(true);" & "});" & "void(0);" ------------------------------ Mike Tamoush ------------------------------100Views0likes4CommentsRedirect to new record
Hello - I am using a formula URL to create a new record in a table. The intent of the button is to essentially copy certain aspects of a record to a new record. (note: I know there are a couple native copy functionalities within QB but their limitations do not work for this use case) I would like to redirect the user to the new record in EDIT view but I am not sure what to add to the formula to do so. Currently, the end of my formula includes this (which redirects to the record on which the button was clicked): & "&rdr="&URLEncode( URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rur How do I need to alter my formula to redirect to the created record in EDIT view so they can make any changes needed from the original record? ------------------------------ Thanks in advance, Jennifer Paschal ------------------------------100Views0likes4Comments