Forum Discussion

ReneeHansen1's avatar
ReneeHansen1
Qrew Cadet
5 months ago

Save & Redirect in a Formula URL Using API_GenAddRecordForm

Hi.

I have a need to "duplicate" the record and populate some fields on the new record (from the original record).

It's not saving my current record before adding the new record, how do I get it to save first? I have the advanced setting turned on.

This is my Formula URL Button:
If(
    [Request] = "Include Existing Contractor + Add NEW FTE for Conversion",
    URLRoot() & "db/" & Dbid() & "?a=API_GenAddRecordForm" &
        "&_fid_53=" & URLEncode([Related Business case]) &
        "&_fid_129=60" & // Softcode the Months Needed to 60 FTE
        "&_fid_68=This Request is related to " & URLEncode([Request]) &
        "&_fid_123=14" & // Sets Request to "New FTE (Related Conversion)"
        "&_fid_127=FTE" & // New Employee Type
        "&_fid_43=" & URLEncode([Contractor PID - Dept]) &
        "&_fid_139=" & URLEncode([Related Level]) &
        "&_fid_138=" & URLEncode([Related Role]) &
        "&_fid_140=" & URLEncode([Related Hiring Manager]) &
        "&_fid_171=1" & // Start Date Override Checkbox to Yes
        "&_fid_259=" & URLEncode([Record ID#]),
    If(
        [Request] = "Add New Contractor + Add New FTE for Conversion",
        URLRoot() & "db/" & Dbid() & "?a=API_GenAddRecordForm" &
            "&_fid_53=" & URLEncode([Related Business case]) &
            "&_fid_129=60" & // Softcode the Months Needed to 60 FTE
            "&_fid_68=This Request is related to " & URLEncode([Request]) &
            "&_fid_123=14" & // Sets Request to "New FTE (Related Conversion)"
            "&_fid_127=FTE" & // New Employee Type
            "&_fid_84=" & URLEncode([Related Role]) &
            "&_fid_29=" & URLEncode([Related Level]) &
            "&_fid_38=" & URLEncode([Related Hiring Manager]) &
            "&_fid_43=" & URLEncode([New Dept1 #]) & // Dept #: sets field 195 to field F
            "&_fid_259=" & URLEncode([Record ID#]),
        ""
    )
)

  • Are you saying you are in Add more and want to click to save the record and go back into Add mode? 

  • Yes, I think so, so i'm adding a record back into the same table. So I want to save, then have the button perform genaddnewrecord (thinking this instead of just addrecord, because they *might* have something to  edit).  

    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander

      Are you attempting this on Mobile or Desktop? If on mobile, the functionality to autosave broke a couple weeks ago and there are no updates from QB. The work around is to switch to a Formula Rich Text button with Class='SaveBeforeNavigating'. If the autosave is not working on desktop, that typically means nothing changed in the record, thus the autosave was not triggered.

  • On Desktop. I figured it out. :D

    For anyone interested in the solution:
    After the form was saving, then opening the new record in edit form, I was the using the native save button from Quickbase EXPECTING it to just magically do what I needed it to do. LOL!  I built a custom save button...and tada! magic.