Parent table: "Sites"
Child Table: "Dispatches"
i'm required to have pictures each quarter, and required to dispatch to site every two months. I'd like to create a summary field on the "Sites" table that will pull a picture from the most current "Dispatch" if it is during a specific quarter of the year.
To implement this you create a summary field on the Maximum [Record ID#] in the Dispatches table and call this field say [MaxDispatchRid]. Then create a text formula field with some HTML allowed using a formula like this:
If you know the database ID, the record ID, the Field ID of the file field you are attaching to, and the version ID, you can use issue a GET request using this URL format:
DBID is your TABLE dbid (not the application dbid)
RID is the rid of the record with the File attachment
FID is the fid of the File attachment field,
VID is the version ID of the file. Specifying 0 (zero) for the VID always gets you the most recent version
"<img src=" & "https://SUBDOMAIN.quickbase.com/up/DBID/a/r" & ToText([MaxDispatchRid]) & "/eFID/v0" & ">"
You will need to substitute your SUBDOMAIN, DBID and FID (but keep the leading "e") and otherwise parameterize and neaten up the formula to suit your needs.
Notes (1) If the most recent image does not also have the maximum [Record ID#] you have to introduce additional summary and lookup fields to "float" the appropriate [Record ID#] up to the parent Sales table.
(2) I noticed that the API document does not mention the SUBDOMAIN so I used the handy comment link at the bottom of every API page to report it. It is very easy to do and helps improve the documentation. See screenshot.