Skip to main content
Question

Adding Documents to tables with related ID

  • February 17, 2022
  • 0 replies
  • 10 views

Forum|alt.badge.img+2
Hello, I am trying to figure out how/why my QB is doing this.
I have 3 tables I am trying to work with.  The main table is "Jobs", 2nd Table is Documents, 3rd is "Permits".  The issue I am having is when I add a document via the Jobs table it links automatically (see attachment called linked id), however when I try and add a document via the permits table it does not automatically link... (See attachment ID not linked).  When I look at all the field settings I can't find the issue.

------------------------------
Scott Hunter
------------------------------
This topic has been closed for replies.

RaziD
Forum|alt.badge.img+3
  • Registered
  • February 18, 2022
Hi Scott:

Let's say your Related Permit field id is X in Documents table so your Add Document button formula in Permits table looks like below:
URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_X=" & URLEncode ([Record ID#])& "&z=" & Rurl()

Also let's say your Related Job field id is Y in Documents Table. Related Job(below) field is in Permits table. So you need to modify your Add Document formula to below:

URLRoot() & "db/" & [_DBID_DOCUMENTS] & "?a=API_GenAddRecordForm&_fid_Y=" & URLEncode ([Related Job])&_fid_X=" & URLEncode ([Record ID#])& "&z=" & Rurl()

Hope this helps
Thank You

------------------------------
Razi D.
Desta Tech LLC
razi@destatechs.com
------------------------------