Link/button to open specific form

  • 5
  • 3
  • Question
  • Updated 2 years ago
  • Answered
I have a report that lists customers. When I choose a customer it brings up a form that has a ton of useful summary info about the customer brought in from many parts of the application (this is done with report links, charts, etc).

I would like to be able to insert buttons (or links) on other forms (in other tables) in the app so that when I am viewing a particular customer I can reference info for the customer by launching that useful summary form for that specific customer. Ideally the form with the summary customer info would open in another window so the user can easily reference info between that new window and the form they were working on (or at least open it in a new tab).

I assume this can be done with a formula url field but I am not clear on the code to use that calls the specific form I need and also ties to the customer of the record I am in at the time. Any thoughts would be appreciated.

Photo of TonyA1


  • 100 Points 100 badge 2x thumb

Posted 5 years ago

  • 5
  • 3
Photo of Mark_Shnier


  • 700 Points 500 badge 2x thumb
no problem

here is the formula

urlroot() & "db/" & [_DBID_CUSTOMERS] & "?a=dr&dfid=XX&rid=" & [related customer]

You get the [DBID_CUSTOMERS] which is the name of your Customers table from the Advanced Settings for the table.

The dfid ("da form ID") is from the URL you see when you preview the form.

Then you need to either feed it the record id ("&rid=" & [the field containing the record id of the customer]) or else you can also feed it a key field instead ("&key=" & [my key field])
Photo of Jennifer Miller

Jennifer Miller

  • 74 Points
This works great, but to take it one step further, would there be a way to automatically call up the print function so that I could print using the specific form rather than just displaying the record using the specific form?  I have a form that includes a ton of information, but only certain information is needed when the record is printed.  I've created the form to use for printing and created the formula URL button using your suggestion below, but rather than just directing my user to a different form and then them having to choose "More" and "Print", it would flow a lot better if the formula URL button just pulled up the print function using the specific form for printing.
Try this as a UIRL formula field

URLRoot() & "db/" & Dbid() & "?a=printr&dfid=14&rid=" & ToText([Record ID#])

This will print using form ID 14.
Photo of Jennifer Miller

Jennifer Miller

  • 74 Points
Works great!  Thanks Mark!  And thanks for the quick reply!