I would like to list the attachments in a single field, to be referenced using a relationship in another form?

  • 0
  • 1
  • Question
  • Updated 8 months ago
  • Answered
I have attachments within Table A, called Publication Tracker, and I would like to quickly access these attachments via single field, both for a report and so I can ideally pull this info into another Table B, called Project Tracker. I have used the List formula field which would be perfect except it just lists the attachments from the selected fields as text, rather than links to the documents.

Is this possible to do, and how?
Photo of ASullivanFFR

ASullivanFFR

  • 210 Points 100 badge 2x thumb

Posted 8 months ago

  • 0
  • 1
Photo of Esther

Esther

  • 702 Points 500 badge 2x thumb
Dear A Sullivan ,

The formula "List" always turn back a string with the information in this fields , but if there is not data but a attached document, then the formula will turn you back the name of the attached documents ;


See;

Description: Concatenates (strings together) all arguments starting with the second argument, using the first argument as the delimiter between them. If one of the arguments is blank, it and the corresponding delimiter are omitted.

Example: List("-", "a", "b", "d") returns "a-b-d"

List(", ", "a", "b", "", "d") returns "a, b, d"

List(", ", [Last Name], [First Name]) returns "Last Name, First Name" if both fields are not empty, returns "Last Name" if [First Name] is empty, and returns "First Name" if [Last Name] is empty.

List("\n", "Name", "Address Line 1", "", List(", ", "City", "State"), "Zip") returns
"Name
Address Line 1
City, State
Zip"

But rather to create a new field with this attachments, you can create a relationship between  the two tables (https://help.quickbase.com/user-assistance/about_relationships.html)

Publication Tracker  < Project Tracker

You make "look up" fields in the son Table "Project Tracker" ,and the information will be pulled down from the related record in the parent table "Publication Tracker" to the son "Project Tracker" table.

Other option; 


Did you try the report link field?. It lets you to show information from another table without have any relationship.

I am using it in the forms to display information, in my case Project , because all the information related a project has a field "Project number" in all the tables, I can display in a single Form all the information related to the same project even when the tables are not connected.

Here is a short explanation ,

https://help.quickbase.com/user-assistance/field_type_rptlink.html

and here is a very illustrative video with some examples,

https://university.quickbase.com/distributing-data-with-enhanced-reports/70936

I hope it helps.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,456 Points 50k badge 2x thumb
You do not need to concatenate the actual file attachments, you need to concatenate a link to each file attachment.

Here is the syntax to make a link to display a file attachment.  Get it working on the parent table and then use it in any List (...) formuals or lookups


URLRoot() & "up/" & dbid() & "/a/r" & [Record ID#] & "/e30/v0"


Replace the 30 with the fid of the field holding the file attachment and you are all set.  
Photo of ASullivanFFR

ASullivanFFR

  • 210 Points 100 badge 2x thumb
I am missing something, I am sure:

var text Words = ToText([FFSP Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Fleet & Family Support]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([CYP Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Child & Youth]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Housing, Lodging, Navy Getaways Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Housing, Lodging & Navy Getaways]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([SFA Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Sports, Fitness & Aquatics]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([REC Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Recreation Programs]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([LIB Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: LIBERTY Programs]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([FBE Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Entertainment & Dining]);
var text URL = URLRoot() & "up/" & dbid(_DBID_PUBLICATION_TRACKING) & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

List(", ",
[FFSP Top 5 Cover Sheet], [Publication Submission: Fleet & Family Support], [CYP Top 5 Cover Sheet], [Publication Submission: Child & Youth],  [Housing, Lodging, Navy Getaways Top 5 Cover Sheet], [Publication Submission: Housing, Lodging & Navy Getaways], [SFA Top 5 Cover Sheet], [Publication Submission: Sports, Fitness & Aquatics], [REC Top 5 Cover Sheet], [Publication Submission: Recreation Programs], [LIB Top 5 Cover Sheet], [Publication Submission: LIBERTY Programs], [FBE Top 5 Cover Sheet], [Publication Submission: Entertainment & Dining])
Photo of ASullivanFFR

ASullivanFFR

  • 210 Points 100 badge 2x thumb
Sorry, *without* the dbid(_DBID_Publication_Tracking)

Error says there are extra characters beyond the formula:
var text Words = ToText([FFSP Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Fleet & Family Support]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([CYP Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Child & Youth]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Housing, Lodging, Navy Getaways Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Housing, Lodging & Navy Getaways]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([SFA Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Sports, Fitness & Aquatics]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([REC Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Recreation Programs]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([LIB Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: LIBERTY Programs]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([FBE Top 5 Cover Sheet]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

var text Words = ToText([Publication Submission: Entertainment & Dining]);
var text URL = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e30/v0";
"<a href=" & $URL & ">" & $Words & "</a>"

List(", ",
[FFSP Top 5 Cover Sheet], [Publication Submission: Fleet & Family Support], [CYP Top 5 Cover Sheet], [Publication Submission: Child & Youth],  [Housing, Lodging, Navy Getaways Top 5 Cover Sheet], [Publication Submission: Housing, Lodging & Navy Getaways], [SFA Top 5 Cover Sheet], [Publication Submission: Sports, Fitness & Aquatics], [REC Top 5 Cover Sheet], [Publication Submission: Recreation Programs], [LIB Top 5 Cover Sheet], [Publication Submission: LIBERTY Programs], [FBE Top 5 Cover Sheet], [Publication Submission: Entertainment & Dining])
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,456 Points 50k badge 2x thumb
Let's get just a smaller link working before you got crazy with 10 links.  This formula would be in the Parent record.

You need to change the 99 in the example below to the respective field ID's where the file attachments are stored.  


var text WordsONE = ToText([FFSP Top 5 Cover Sheet]);
var text URLONE = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e99/v0";

var text LinkOne = "<a href=" & $URLONE & ">" & $WordsONE & "</a>";

var text WordsTWO = ToText([Publication Submission: Fleet & Family Support]);
var text URLTWO = URLRoot() & "up/" & dbid() & "/a/r" & [Publication Submission#] & "/e99/v0";

var text LinkTWO = "<a href=" & $URLTWO & ">" & $WordsTWO & "</a>";

List("<br>", $LinkONE, $LinkTWO)
Photo of ASullivanFFR

ASullivanFFR

  • 210 Points 100 badge 2x thumb
That worked! Thank you!
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,456 Points 50k badge 2x thumb
Thx for letting me know that we got there. :)
(Edited)