Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
7 years ago

Using Quick Base Action to copy file attachment

I currently have a Quick Base Action set up that does the following:
 - Creates a new record in a different table when a certain box is checked
 - Copies several fields from the original record to the new record

How can I get this to also copy a file attachment to the new record, whether using Quick Base Actions, Webhooks, Formula fields, or anything else? I cannot seem to find a solution to this exact scenario.

23 Replies

  • That cannot be done by mere mortals.  You would actually need to engage with a Quick Base Solution provider to do that.

    But how about just putting a link on the new record.

    The formula for such a link would be

    URLRoot() & "up/" & [_DBID_my table name where the file] & "/a/r" & [Record ID# of the record with the file] & "/e30/v0"

    Change the e30 to exx where xx is the field ID holding the file.
    • ArchiveUser's avatar
      ArchiveUser
      Qrew Captain
      Appreciate your response to this last month, it worked brilliantly! However, I'm running to a different issue concerning the button links I have created to these URLs.

      I have 7 record attachments that "copy over" in this way from one table to another (the links appear as buttons on the new record).

      However, not all of these attachment fields will actually have an attachment (usually only 2-3 attachments were actually uploaded). Quickbase is somehow copying URLs for attachments that do not exist and showing the buttons on the new record - how do I prevent this? When you click the link button, it takes you to a page that says the attachment doesn't exist. How can I tell it to not copy this field if it is blank?
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      I suggest that you make a field which is the ToText value of the file name.

      Then set a Condition for the Action to fire only when that is not blank.
    • MichaelBarrow's avatar
      MichaelBarrow
      Qrew Cadet
      Could also handle this a step before that and just embed the current button code within an IF() function that tests whether or not an attachment exists for that button, and if it doesn't, hide the button so it can't be clicked.
  • I thought I was going to get away with not doing this, but I have rolled out my Quickbase app at my company and not so much.

    For some reason I cannot wrap my head around this formula. Am I putting this in as Formula - URL or some other type?
  • Ok so I am confused about the [Record ID# of the record with the file] part of the formula. It would need to copy a different record each time, so this doesn't seem like it would work?

    Each record in the destination table would need to have a link to a corresponding record in the original table, but they will be different attachments for every record.

    Is this possible? Or is the only way to do this manually in every record?
  • I am trying to access the related record's attachment with Zapier. A URL to the related record's attachment does not let Zapier pull the attachment properly. Any thoughts on how to do this? If I could copy the attachment when creating the new record it would not be a problem.
  • Hi Chelsea/Jeff,
      we have a file attachment sweep add-on that will do exactly what you are looking for.  It can sweep the file from a record in one table and either update a record in another table or add a new record into the table. It will also either move into the other table or just copy it if you want it in 2 places.

    You can demo it here:  https://juicedtech.quickbase.com/db/bmzi5qjk7

    When a new record is added, the sweep process can:
    • Sweep the file and DELETE it from the record
    • Sweep the file and KEEP the original file on the record
    Additionally it can be scheduled to run daily/weekly/monthly to sweep records controlled by a Quick Base report.

    Keith