Discussions

Expand all | Collapse all

Automatically clear file attachment field?

  • 1.  Automatically clear file attachment field?

    Posted 12 days ago
    Hi, 

    I'm attempting to automatically clear the file from a file attachment field. I've tried using actions, automations, and pipelines and I haven't been able to figure out a way to do this. Is there a way?

    ------------------------------
    Thanks,
    Alex
    ------------------------------


  • 2.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    here are some cheat notes that will help.
    URL to delete a file attachment

    URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
    & "&_fid_9="
    & "&delfile_fid_9=1"
    // & "&apptoken=<your apptoken>"





    Because someone else might come along looking for this: here's the XML version:

    <qdbapi>
    <udata>mydata</udata>
    <ticket>auth_ticket</ticket>
    <apptoken>app_token</apptoken>
    <rid>[record_id]</rid>
    <field fid="[field_id]" filename="delete"></field>

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    Edited by Justin Torrence 12 days ago

    @Alex Gale

    It looks like there isn't any explicit support in Pipelines for deleting a file attachment.

    You could use the "Make Request" action in the Quickbase Channel under "Quickbase APIs" for this. This basically allows you to create your own custom Quickbase Pipeline Action (You just have to know enough about the API to form the call)

    @Mark Shnier (YQC) has done some of the heavy lifting for you in his reply, if you wanted to use the HTTP API instead of the Restful API.



    ------------------------------
    Justin Torrence
    Quickbase Expert, Jaybird Technologies
    jtorrence@jaybirdtechnologies.com
    https://www.jaybirdtechnologies.com/#community-post
    ------------------------------



  • 4.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    Thank you everyone for your help. I was able to use this advice to create a pipeline with an API call that does what I want. I chose a pipeline because I wanted a branching IF condition, but I assume a webhook would have also done the trick.

    ------------------------------
    Thanks,
    Alex
    ------------------------------



  • 5.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    Edited by Mark Shnier (YQC) 12 days ago
    Here is an example of how to make a webhook to Quickbase


    Webhook.
    Make Request
    a bunch of the top fields are left blank

    URL
    https://mycompany .quickbase.com/db/xxxxxxxx (ie the target table) 

    Method
    POST

    (more)

    Content Type
    Application/XML

    (strangely, the Body is entered next but when saved comes back in the sequence below)

    Headers (list)
    Name
    QUICKBASE-ACTION

    Value
    API_RunImport  ( in your case API_EditRecord) 

    Body
    <qdbapi>
    <usertoken>bxv4tx_wve_dcxcxcxcxcxcxcxcxc</usertoken>
    <id>10</id>
    </qdbapi>

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 6.  RE: Automatically clear file attachment field?

    Posted 12 days ago

    @Mark Shnier (YQC)

    Do you know if Quickbase going to be deprecating Webhooks and Actions along with Automations? Or will those be here to stay?



    ------------------------------
    Justin Torrence
    Quickbase Expert, Jaybird Technologies
    jtorrence@jaybirdtechnologies.com
    https://www.jaybirdtechnologies.com/#community-post
    ------------------------------



  • 7.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    Maybe "aspirationally"  but likely many many years from now or never.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 8.  RE: Automatically clear file attachment field?

    Posted 12 days ago
    Hi Justin,

    To follow up on Mark's answer we don't have any plans to close out Webhooks or Actions at this time. They both make use of our underlying Webhooks capabilities and not on a devoted engine like Automations does so they don't need to be tied together.

    ------------------------------
    Evan Martinez
    ------------------------------