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 ------------------------------199Views0likes3CommentsClose 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 ------------------------------100Views0likes16CommentsAPI Edit Record, Mailto, and a rdr or nexturl?
Hi everyone, I am trying to create a button via rich text field that will process an API call to update a record, open an email via a mailto, and redirect back to the record page I was on in one click. I understand there is no way to confirm the email was sent, but opening in the browser will be okay by me. Here is the code I have, which shows a white blank page after running. How do I continue the rdr back to the url? You can see I commented out code as it was not working: var text baseurl = URLRoot() & "db/"& Dbid(); var text purchTbl = $baseurl & [_DBID_PURCHASE_ORDERS]; var text editRecord = "?a=API_EditRecord&apptoken=" & [EliteApptoken] & "&rid=" & [Record ID#]; var text LABEL = "Executive Approval"; var text decoration = "text-decoration: none;"; var text bgColor = "background: #0044cc;"; var text txtColor = "color: white;"; var text txtAlign = "text-align: center;"; var text txtShadow = "text-shadow: none;"; var text border = "border-radius: 5px;"; var text padding = "padding: 8px 20px;"; var text display = "display: inline-block;"; var text font = "font: normal 700 24px/1 'Calibri', sans-serif;"; var text styleOptns = List("", $decoration, $bgColor, $txtColor, $txtAlign, $txtShadow, $border, $padding, $display, $font); var text mailto = "mailto:" & [Manufacturer - PO Submission Email] & "?subject=Purchase Order&body=Please review the attached Purchase Order and confirm receipt."; If([Old PO], "", If(IsNull([Executive Review On]) and IsNull([Project Review On]), "<span style= 'font-family:Calibri;color:#57a3f0;font-size:14px'><Strong>Requires Executive Approval</Strong><br /></span>", "<div><a style='" & $styleOptns & "' class='Vibrant' href='" & $baseURL & $editRecord & "&_fid_40=" & Today() & "&rdr=" & URLEncode($mailto) & //URLEncode("&rdr=" & //URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Record ID#]) & "'>Submit PO</a></div>"))//) ------------------------------ Ivan Weiss ------------------------------99Views0likes8CommentsButtons, 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 TextFormula 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 ------------------------------99Views2likes1CommentButton to edit existing record and create / copy all information to new record
I currently am using an "Approve" button that is functioning to change one field in an existing record, however, I would love for that one button to not only edit the existing record but also create a new record with mostly the same information as the existing record minus a few fields one of which will need to be changed as the button is pressed and the others can be left blank if they vary from the existing form. When using the API_AddRecord is there a way to tell that record to pull field information off the current record and populate it on the new record? Current button code: URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_26=Approved" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()) Currently stuck on new button code: URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_26=Approved" & "&rdr=" & URLEncode(URLEncode( URLRoot() & "db/"& Dbid() & "?a=API_AddRecord" (Fields here) "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()) Thank you in advanced for any assistance or help! ------------------------------ Peter Krasznekewicz ------------------------------99Views0likes3CommentsConfirm button to show pop up message box
I am unable to figure this out. I was able to create the button itself, but not sure what code is needed to open a pop up message box. Here is what I have so far: "<a style=\"background: #4285f4; border-radius: 5px; padding: 8px 20px; color: white; display: inline-block; font: normal 700 24px; text-decoration: none;\">Confirm</a>" I need the button to also open a pop up box to display a message before the user actually saves the record. The button does not need to actually save the record, just display a message and have an 'OK' box to click. All I can find is Javascript and I know that can't be used anymore. ------------------------------ Amy Gosz ------------------------------99Views0likes10CommentsFormula-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 ------------------------------99Views0likes0CommentsPossible 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 ------------------------------99Views1like4CommentsSave 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 ------------------------------99Views0likes8CommentsRedirecting 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 ------------------------------98Views0likes6Comments