Skip to main content
Question

Remove file attachment with button

  • January 31, 2020
  • 0 replies
  • 69 views

Hi, I was wondering if there was a way to remove file attachments from a form using a button?

------------------------------
GMacri
------------------------------

MarkShnierYou
Forum|alt.badge.img+24
Not tested but my notes say that this will work.  Can you post back with your working code when it works?

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

// obviously 9 would be replaced with the field ID of your file attachment field.

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

MarkShnierYou
Forum|alt.badge.img+24
The complete code would be this


var text URL = URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]

& "&_fid_9="
& "&delfile_fid_9=1";


"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"


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