Skip to main content
Question

Link/button to open specific form

  • August 30, 2014
  • 0 replies
  • 623 views

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.

Tony
This topic has been closed for replies.

Forum|alt.badge.img+6
  • Registered
  • August 31, 2014
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])

  • Author
  • Registered
  • August 31, 2014
Mark....thank you!  Works great!

  • Registered
  • September 17, 2014
Hi Mark, thanks for this explanation. How can I make the form to open in view mode. It currently opens in Edit mode?

If its opening in edit mode then your formula must be having this

a=er  (which says "action = edit record")

instdwad of

a=dr (which says "action = display record")

  • Registered
  • September 18, 2014
Never mind Mark, I figured it out. Thanks.

  • Registered
  • September 18, 2014
Hi Mark, I just saw your email after posting the previous comment. Thank you much for your quick response and being of help to us.

Dear, how can I make the button sending to another from for the same table? Thanks a lot.

Please post a new question.

  • Registered
  • May 18, 2016
locate the form ID (dfid) and insert it after the API_GEN.... as shown below using "##". you can find the form ID by going to settings/Forms of the child table.




API_GenAddRecordForm&dfid=##&.....

Hope this helps.

what if I need not to open form for Add Record, but rather to Edit Current record? Thanks for help

  • Registered
  • May 19, 2016
Hi, this is what i use - I have typed in CAPs all the fields you have to change in your formula.

"https://DOMAIN NAME/db/TABLE ID?a=nwr&dfid=FORM ID\n&_fid_RELATED FIELD ID IN PARENT TABLE=" & URLEncode ([ID OF KEY FIELD IN CHILD TABLE])

To edit a record th format is this

urlroot() & "db/" & dbid() & "?a=er&dfid=xx&rid=" & Totext([Record ID#])



where xx is the form ID#

  • Registered
  • February 24, 2017
I am trying to use the same approach but in my case I have two unrelated tables with one field in each that matches.  So tried the following but no luck. 

URLRoot() & "db/" & [_DBID_Customers]& "?a=dr&dfid=2&rid"& [Location No]=" &[Location No])

Arshad,

If you are looking to launch a report, the. Build your perfect report and have an question for the missing information. Then build the link below and it will launch a report and answer its own question using data from the record that you are launching from.

Suppose your perfect report is qid=99

Urlroot() & "db/" & [_DBID_TABLE NAMEGOESHERE] & "?a=q&qid=99&nv=1&v0=" & [Location No]

If you are just looking to provide a link to a scored or records off a a record, you can just use a report link field. You do not need a relationship to have a report link field.

  • Registered
  • February 27, 2017
Thanks. I was merely giving an option to users to open another form for the specific record they are on.  Can this be achieved if two tables are not linked yet they have a common field? 

  • Registered
  • February 27, 2017
If that common field is the key field then you can send them directly to that record and that specific form.  If it is not the key field you will have to do the query and then load that record to that form (might have to be another formula button.

Hi Mark,

Is there a way to focus on a particular section after clicked on a button.

It means after perform some tasks in a button then, user should foucs on the desired function.

Thanks,

Gaurav