Discussions

Expand all | Collapse all

Unable to copy file upload field value to another table in Automation editor

  • 1.  Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 12:22
    I'm creating an automation that copies field values from one table to another. The only field that I am unable to copy is a file upload field. Do automations not allow file upload field copy? Any insight would be very helpful, thanks!

    ------------------------------
    Matt Makris
    ------------------------------


  • 2.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 12:56
    Correct, the Automaton will not copy across file attachments.  But It can copy across a link to view the file attachment.

    You can make a formula rich text field on the source table called perhaps [View File]

    "<a href='"& URLRoot()&"up/"&Dbid()&"/a/r"&[Record ID#] & "/e7/v0' target='_blank' >" & [File] & "</a>"

    where you would replace the 7 with the field ID#of the file attachment field.  Get that working on your source table first.

    Once that is working, Sync it across to the target table but call it like [View File (raw text)], as it will Sync across as a text field and not a Rich Text field.  

    Then create a Formula Rich Text field with the good name of [View File] and the formula will just be

    [View File (raw text)]

    Lastly, there is the pesky permissions issue. Nothing in Quick Base works without Permissions.  So either you users will need to have access to those Source table records, or else , most conveniently there is a field property on all file attachment fields to allow EOTI access (Everyone On The Internet).

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 16:48
    Mark-  This does answer my question up to the point of permissions...   really what I'm trying to do here is download a file attachment from QB (which then is sent off to an email program as an attachment).  So all of my work is happening via an external service that is calling QB APIs....so using your post I now understand how I can build the URL to download the file attachment- but normally I would be including a user and apptoken in my API calls.... doesnt seem like I can do that in this case?   So not sure how to proceed- and don't love the idea of making the file attachments EOTI

    ------------------------------
    Scott Pugh
    ------------------------------



  • 4.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 16:54
    Sorry, but if there is an API call that you can use, why are you saying that you cannot supply a usertoken to deal with permissions?

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 5.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 17:07
    Edited by Scott Pugh 01-20-2020 17:15
    Admittedly I'm making an assumption as I havent yet tried this...
    But if I put the URL (replacing the xxx's)   https://xxxxxx.quickbase.com/up/xxxxxxx/a/rxxxx/exx/v0   into a webpage it (understandably) forces me to login first before it downloads a file
    I will be calling that URL from a web service to stream the file contents to the service, which then does some other things with that file.... my assumption (this is what I havent tried) is that it will error out because I"m not providing any authentication....        Or maybe a better way of saying is I actually hope it will error out because I havent provided any authentication
    normally in my QB API calls made from external services I'll include the user and apptoken.....but how/where do I include the user and apptoken in this URL?  https://jennason.quickbase.com/up/xxxxxx/a/rxxx/exxx/v0
    --
    Scott Pugh
    Jennason LLC | Principal
    Minneapolis, MN | (704)763-0703





  • 6.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 17:09
    Edited by Mark Shnier (YQC) 01-20-2020 17:50
     mycompany.quickbase.com/up/xxxxxxx/a/r3672/e522/v0&usertoken=xxxxxxxxxxxxx

    try the above



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 7.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 01-20-2020 17:40
    I think you're on the right track.... i think you just have to add a ? before the &usertoken... good early results...will keep you updated

    --
    Scott Pugh
    Jennason LLC | Principal
    Minneapolis, MN | (704)763-0703





  • 8.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 12 days ago
    Hi Mark,

    Thanks for setting out how to do this and we have it working.

    Is there a way, rather than download the PDF, to view in a new browser window?

    Thanks

    Tim

    ------------------------------
    Tim Egerton
    ------------------------------



  • 9.  RE: Unable to copy file upload field value to another table in Automation editor

    Posted 12 days ago
    I believe that's a setting in your Browser as you whether to automatically open files of a certain type.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------