How do I make my formula-URL link to a specific record?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered

I have a table in which I am storing revision controlled documents, and a table which manages project steps. These documents help guide users through the stepped process with things like negotiation and contract language, and I need them to appear in the respective sections of the project form. The two table are not related, nor do i think they need to be in that only admins will have the ability to update these controlled documents. When I use a simple URL, I can only set a static location in the default value that points to a specific document, not necessarily it's revision, nor does it populate for existing records. 

What i would love to do is create a button that will direct to say the latest negotiation document (this is a field that will be static while the revision may change.) Any ideas? 

Photo of GB_DirectorOfOne

GB_DirectorOfOne

  • 70 Points

Posted 3 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Are you just looking for the URL to open up the most current file attachment on a record regardless of the file name?
Photo of GB_DirectorOfOne

GB_DirectorOfOne

  • 70 Points
Yes, and I did check using an ordinary URL field with a static default value, and it seems to grab the latest revision. But I'm not 100% sure.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
try this URL

URLRoot() & "up/" & [_DBID_DOCUMENTS] & "/a/r" & "99" & "/e11/v0"


In this example obviously you need to put in your own _DBID_ and then in place of the 99 insert the record ID and in place of the 11 you put the field ID of the file attachment field.  The V0 means to pull the zeroth (most current) revision in the file attachment field.  Note that this will work regardless of the file name.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Mark, if I am calling this record from dashboard using URL, how would I modify the code? 
Photo of Matthew Neil

Matthew Neil

  • 31,678 Points 20k badge 2x thumb
Is it always the same record?  If so, just copy the URL.
If not, how are you going to know which record you are looking for?
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Arshad, Mathew is correct. Just expose the code from that URL on a form by removing the link name. Then copy that code that you see to your clipboard. Then make a dashboard button which is a URL and paste it in.

Then put the link name back on that field on your form.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Yes there are 4 records, each has a file attachment. I would like the user to click on the button and if possible open the file and if not download it. So not only I need to direct it to the right record but the attachment field. Not too sure if this what is addressed by Mark's solution.
Photo of Matthew Neil

Matthew Neil

  • 31,678 Points 20k badge 2x thumb
QuickBase doesn't have a native "Document Viewer",  (CirrusOps does however), to view it with native QuickBase, you will always have to download the file.
As far as finding all 4 child records and attachments from a dashboard button... Don't' think that'll happen. 

My suggestion is to have the parent record on the dashboard, then with one click they can open it, and see all the relating child attachments.

Again this depends on your work process flow.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
This syntax will open the file - ie, cause it to be donwloaded, not just land the user on a record.

URLRoot() & "up/" & [_DBID_DOCUMENTS] & "/a/r" & "99" & "/e11/v0"

The 11 is the fid of the file attachment field.
The 99 is the record ID#

Mark
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Thanks Mark. And how could I  use this  to be a URL to directly get to download menu,  I would like to use a button in the dashboard.  
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
Sorry, I am not understanding your question.

If you click this link it will download, and yet you have no permission to that app.
https://gesco.quickbase.com/up/7j6hiif8/a/r624/e10/v0

Iis that what you are trying to achieve?

 You can see that the format is similar to the URL formula format just above this post.  So you build that link, and look at the result on the form and then copy it and then make a dashboard button of type URL and just paste in the link.
Photo of Arshad Khwaja

Arshad Khwaja

  • 3,152 Points 3k badge 2x thumb
Sorry for not being too clear.  In one of my app, we are trying to allow users to directly download a few reports from the dashboard.  Its a shame we cannot display or open a PDF.  So I have created a documents table which will only ever be a set number of documents which will continue to be updated. As a button in the dashboard would  use a URL (I think) to download such file, my question was how to use the statement you have put together to be used as URL.     
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
I think that we should talk in person.  i will send you an email.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,542 Points 50k badge 2x thumb
I spoke to Arshad and he is good now.