Forum Discussion

GeorgeBramhall2's avatar
GeorgeBramhall2
Qrew Cadet
31 days ago

Button that adds record #2 from record #1 in same table ... but returning to record #1 after save.

After save, I want to stay on Record # 2 , not return to Record #1 which is what's happening now with code below.

Here is my code (I am pre-populating some values in Record #2 from Record #1). The button resides and is clicked in Record # 1.

URLRoot() & "db/" & [_Table Name] & "?a=API_GenAddRecordForm&_fid_265=" & URLEncode ([Costing Assigned To])
&  "&_fid_268="&URLEncode([Pricing Assigned To])

Note: there is no redirect in my code.

  • DonLarson's avatar
    DonLarson
    Qrew Commander

    George, this is a Formula URL field?  That is the full content?

    • GeorgeBramhall2's avatar
      GeorgeBramhall2
      Qrew Cadet

      Yes it is a URL formula field. Not the full content. I have over 100 other fields that I am copying over from Record #1 to Record # 2 in the formula.

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        Does the code end with or include this text here?  If so comment it out or remove it.

        & "&z=" & Rurl()

    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend

      Well I saw your Google link but it didn't actually show me the formula with the changes. When you make those changes on the formula it will land the user on the record in view mode. Note that if you are using formula fields on new forms, somewhat annoyingly when you make a formula change in the field they may not immediately refresh on the form. 

      • GeorgeBramhall2's avatar
        GeorgeBramhall2
        Qrew Cadet

        formula with changes in new google doc: https://docs.google.com/document/d/1pHc17_9nneib8pQeTfZ7jwzY8U4S02FMWSoibMK8C9o/edit?usp=sharing

  • I figured it out. Instead of selecting open on same page in button, I selected open in new window and now when we save we stay on the same record.  Sometimes we need to take a break from a challenge and start fresh later.