Discussions

 View Only
  • 1.  Automatically clear file attachment field?

    Posted 10-05-2021 14:35
    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 10-05-2021 14:51
    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 10-05-2021 14:59
    Edited by Justin Torrence 10-05-2021 14:59

    @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 (Your Quickbase Coach) 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 10-05-2021 15:02
    Edited by Mark Shnier (Your Quickbase Coach) 10-05-2021 15:02
    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
    ------------------------------



  • 5.  RE: Automatically clear file attachment field?

    Posted 10-05-2021 15:06

    @Mark Shnier (Your Quickbase Coach)

    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
    ------------------------------



  • 6.  RE: Automatically clear file attachment field?

    Posted 10-05-2021 15:14
    Maybe "aspirationally"  but likely many many years from now or never.

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



  • 7.  RE: Automatically clear file attachment field?

    Posted 10-06-2021 09:41
    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
    ------------------------------



  • 8.  RE: Automatically clear file attachment field?

    Posted 10-05-2021 15:14
    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
    ------------------------------