Forum Discussion
Can you clarify? Are you saying that the file attachment is on a child record and you want to click a button on the parent record to download the file attachment? What if the parent has Many children? Which child record URL are you looking to pull or do you want to pull them all?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
- RaymondSakar2 years agoQrew Cadet
Hi Mark, Yes I can clarify..
Each Project will have only one child record in the Files table where File Type="Petition" (I ensure this with a table rule). I'd like the URL of that child record on the Project record. I think I could do this by using summary fields and a url formula, but I was curious if I could through formula queries, too.
------------------------------
Raymond Sakar
------------------------------- MarkShnier__You2 years agoQrew Legend
There's more than one way to do this. But the starting point is to get a URL formula field on the child record which will display the file.
"<a href='"& URLRoot() & "up/" & Dbid() & "/a/r" & [Record ID#] & "/e7/v0' target='_blank' >" & [File] & "</a>"
In the formula above, change the e7 to e? where ? is the field ID of the file attachment field.
Test to make sure that works and then roll that up to the parent record with a combined text summary field. Except the only problem is that the Combined Text Summary field only works on text field type so you'll have to make a mirror field for that which is just a formula text field with that field as its formula.
Then once you get the Combined Text Summary field rolled up to the parent you would need another Rich Text formula field to convert that back to a Rich Text field type, it will appear to the user as a hyperlink of the file name which they can click to download.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- RaymondSakar2 years agoQrew Cadet
Ahh. OK. So wise, Mark. Thank you. That worked!
------------------------------
Raymond Sakar
------------------------------