Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
5 years ago

Record doesn't necesarily save with button click?

I was under the impression that if you selected the 'Save Parent Automatically When Child is Created', that this would auto save the record with any button click. It looks like this isn't the case, so what button clicks does it autosave with, and if it's a formula URL does it matter if it's opening in a new window or not?

My use case is as follows.

I have a table called Orders. I have a button that does a few things as shown below (edits a field in a User Focus table then redirects to a report). One of the key points, is it passes a field called Order No. Order Number is simply a formula field "O-" & [Record ID#]. Obviously, this field is essentially blank until the record is saved and there is a record ID.

I want my button to save the record, then pass the order # through and continue on. Is this possible? Is there a way to force the save and then move on?

var text EditUserFocus =
URLRoot() & "db/" & "bp8yr9i5s?a=API_EditRecord" &
"&key=" & UserToEmail([Current User]) &
"&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxx" &
"&_fid_193=" & [Record ID#] &
"&_fid_194=" & [Order No:];  //I need this to pass through, but if the record isnt already saved it is currently blank

var text Redirect =
URLRoot() & "db/" & "bq8hafpix?a=q&qid=20";

$EditUserFocus
& "&rdr=" & URLEncode($Redirect)


------------------------------
Mike Tamoush
------------------------------
  • I think that would need real code on a code page.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • MichaelTamoush's avatar
      MichaelTamoush
      Qrew Captain
      Thanks Mark. What is the scenario that it autosaves due to the 'Save Parent Automatically...'? Is that only when it's truly adding a child? Or perhaps only with the Gen Add Record API?

      ------------------------------
      Mike Tamoush
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        It's a timing issue.  The record does not exists when you push the button so the [Record ID#] does not exist "in time".

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------