Forum Discussion
QuickBaseCoachD
7 years agoQrew Captain
The fix is to change your ad child button. Can you post your code for at child and I�ll show you how to fix it.
- TauryAnderson27 years agoQrew TraineeURLRoot() & "db/" & [_DBID_WORK_ORDERS] & "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])& "&_fid_44=" & URLEncode([Address Code]) & "&z=" & Rurl()
&"&_fid_236="& URLEncode(1) - QuickBaseCoachD7 years agoQrew CaptainNo problem, just get rid of this.
& "&z=" & Rurl()
That will allow you to stick the landing like in gymnastics and stay right on the record that you just saved. - TauryAnderson27 years agoQrew TraineeYay! works perfectly! Okay, one more question and then I swear I am done - how do I use this button to ALSO change a field in the record I am about to save? I have a fid #248 called "Type" which needs to be changed to the contain the text "Estimate" before the Save occurs.
- QuickBaseCoachD7 years agoQrew CaptainURLRoot() & "db/" & [_DBID_WORK_ORDERS]
& "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])
& "&_fid_44=" & URLEncode([Address Code])
& "&_fid_236="& URLEncode(1)
& "&_fid_248="& URLEncode("Estimate") - TauryAnderson27 years agoQrew TraineeI realize that this is what I would put in there if this were a formula-URL type field, but you original solution is for script that is used in a formula-rich text field (right? this is how it is working now). BUT, I need both of these things to happen when the one button is clicked:
- fid 248 contents changes to "Estimate"
- The new record is then saved
- "<a id='saveButton' class='Vibrant Success' onclick='DoSave()' href='#'>WhatEverYouWantYourButtonToSay</a>"
- URLRoot() & "db/" & [_DBID_WORK_ORDERS]
& "?a=API_GenAddRecordForm&_fid_20=" & URLEncode ([Record ID#])
& "&_fid_44=" & URLEncode([Address Code])
& "&_fid_236="& URLEncode(1)
& "&_fid_248="& URLEncode("Estimate")
- QuickBaseCoachD7 years agoQrew CaptainThere is no need to use that extra save button, unless for some reason, having the green save button on both the top and the bottom of the form is not enough for your users and they need three!! save buttons on the form.
The code I provided will launch the ADD record form and pre-populate fid 248 with "Estimate". - TauryAnderson27 years agoQrew TraineeI do in fact need a button that does that. At the bottom of the table, we want to make two different save buttons:
Save as Work Order
Save as Estimate
I realize that we could manually choose one for the type field and then click save - that would be the obvious thing to do. I have had this sort of request before, so I figured I would try and see if you could feed me the code to make it happen.
Are you saying that is can't be done within a single formula-rich text button? - QuickBaseCoachD7 years agoQrew CaptainSorry, I do not know if its possible to make an update to the form while saving. I don't believe that it can be done without non native scripting.