Forum Discussion

SarahDriscoll1's avatar
SarahDriscoll1
Qrew Trainee
10 months ago

Button to Redirect to an Editable Form in Another App

Hello,

I am trying to create a button that will redirect users to users to the same record in another app where they can edit information.

I've used several different formulas with partial success. Below is all relevant information:

Table ID I am trying to redirect to: btan5p92a?a?a

Matching Field ID in other app: 261

Examples formulas I have written utilizing the Formula-URL field type:

1) URLRoot() & "/db/btan5p92a?a?a" & "?act=API_EditRecordForm&_fid_261=" & [Project ID] & "&z=" & Rurl()

2)URLRoot() & "/db/btan5p92a?a?a" & Dbid() & "?a=API_EditRecord&rid=" & [Project ID] & "&rdr="&URLEncode(URLRoot() & "/db/btan5p92a?a?a" & Dbid() & "?a=doredirect&z=" & Rurl())

Both formulas redirect to the apps homepage, but not to the specific table or form. Is this possible to create? 



------------------------------
Sarah Driscoll
------------------------------

5 Replies

  • Here would be the proper syntax it seems of what you're trying to do:  

    var text urlOne = URLRoot() & "db/btan5p92a?a=API_EditRecordForm&_fid_261=" & [Project ID];

    var text urlTwo = URLEncode(URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Project ID] & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl()));

    $urlOne & $urlTwo

    But it also seems like you still have a little work to do if you're trying to redirect. The actual button above is actually trying to do an API Edit Record call in both apps - but neither is actually doing that properly. If thats the case, you'll need to provide more _fid_ parameters for what info you're actually attempting to change. 

    If your goal is just a redirect to a different app with the same record id # - then the syntax you should use is:

    URLRoot() & "db/" & "btan5p92a?a=er&rid=" & [Project ID]



    ------------------------------
    Chayce Duncan
    ------------------------------
    • SarahDriscoll1's avatar
      SarahDriscoll1
      Qrew Trainee

      When I use that last formula, I get an error that the record can't be found but I know it is there. 

      The records id #'s are different from table to table but the Project ID #'s are the same and are the key's in both apps. is there anything additional that would need to be written into it?



      ------------------------------
      Sarah Driscoll
      ------------------------------
      • ChayceDuncan's avatar
        ChayceDuncan
        Qrew Captain

        Yep - if Project ID is the key then you can use the same formula but instead do: 

        URLRoot() & "db/" & "btan5p92a?a=er&key=" & [Project ID]

        In this case you're swapping out rid with key



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