Skip to main content
Question

Utilizing a different form when clicking the "Add Record" button

  • February 7, 2020
  • 0 replies
  • 396 views

I'm looking to have a user utilize a different form to add a record to a table depending on which table they are adding the record from.

I assume this can be done via some sort of URL Report field , just not sure where to indicate what form it is routed to in the child table.

------------------------------
Chris Swirtz
------------------------------
This topic has been closed for replies.

  • Registered
  • February 7, 2020
You can either pick what form each role will use for Add, Edit, or View on the table itself in the Forms section under "Set how different roles use these forms" or you can set it in the URL by doing &dfid=MyFormNumberHere. I'm not positive the first one would work when doing it via the URL but you could explore that and see. I think it should work.

Edit: After reading again you definitely want the second option using dfid. But the first option is there for another time.

Forum|alt.badge.img+15
  • Registered
  • February 7, 2020
Chris,

Here is an example that works the way Austin laid out

var text URLGenAdd =
  URLRoot() & "db/" & Dbid() &
  "?a=API_GenAddRecordForm&_fid_8=" & URLEncode ([Record ID#])&
  "&dfid=10" &
  "&z=" & Rurl();


This will add a new record using Form Ten.  It also fills in field 8 with the Record ID # from where you started.

Change Dbid() to a table alias to pick a different table to be adding the record using Form Ten from that table.​

------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------