Forum Discussion

ChristineKirk's avatar
ChristineKirk
Qrew Cadet
5 months ago

Using a formula field to open a record in another form

Hi there! What am I doing wrong here.... I don't know coding but copied a sample I found out there somewhere. I'm trying to have a clickable button that opens my record in a different form - which I do have - but then when I go to "edit" in that other form (which is half the purpose of having it link here), that pop-up reverts to the starting form.

My URL formula - URLRoot() & "db/" & Dbid() & "?a=dr&dfid=15&rid=" & [Record ID#]

And ACTUALLY - while I'm here - is there a similar way to place a similar button on a linked child table? It would be nice to have one spot where this info is kept - and if I'm creating a record on the child table, I can click an action button to get to the specific Parent Form. Alternatively, if I could just pull that form in and just display it on the child table - today, I do that by manually maintaining two identical forms. I had asked QB about this, and they were looking into whether a future development might be to enable elements like Forms to be pulled like this, so that manual maintenance of two isn't necessary.

Thanks in advance!



------------------------------
Christine Kirk
------------------------------

13 Replies

  • For your first question - if you want them to land on the edit form go ahead and swap out dr with er in your url. So:

    URLRoot() & "db/" & Dbid() & "?a=er&dfid=15&rid=" & [Record ID#]

    To your second question about opening the parent from the child - it's easy enough with the same format but different field inputs: 

    URLRoot() & "db/" & dbid of parent & "?a=dr&rid=" & [Related Parent Value Field]

    I always recommend using the table alias instead of hard coding the dbid as well

    https://helpv2.quickbase.com/hc/en-us/articles/4570272019220-Table-aliases



    ------------------------------
    Chayce Duncan
    ------------------------------
    • ChristineKirk's avatar
      ChristineKirk
      Qrew Cadet

      Thank you! To the first question - how can I have it open in the alternative form in View, but still be able to then Edit from that same alternative form? Both are valuable, and landing in "View" is my preference if I can help it.



      ------------------------------
      Christine Kirk
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        The Edit button that QB natively provides will only ever go to the 'Default' form unfortunately - so if you're on form id 15 and hit edit it will always drop you back in the default form. Others probably have their own opinion on ways to do this - to solve it in the short term you can just make your own 'edit' button that you put at the top of the form and try and direct your users there - basically just put the button up top and hope you're users don't click the native edit.



        ------------------------------
        Chayce Duncan
        ------------------------------