Forum Discussion
You should be able to use a Make Request Step in A Pipeline.
First make a formula URL field on the table to have it generate the code.
URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_9="
& "&delfile_fid_9=1"
Then expose that code result and copy paste it into the Pipeline make request URL.
The carefully hand edit it in the Pipeline step as you need to get rid of the hard coded record ID that you see, and instead drag down the reference to the record ID to be deleted form the trigger step.
for example it would probably need to be {{a.id}}
Also I think you need to select it as POST and not GET method.
Feel free to post back it you have any issues as I did not recently test this.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
I used your guidance here to create a Pipeline the would delete file attachments in bulk.
It seemed to work great - if you look at the file attachment field there is no longer any text showing for the file and there is now thumbnail, BUT the file attachment size for this table was unchanged - despite seemingly deleting about 19,000 photos.
What appears to be happening is that I am deleting the current version - BUT the file that had been there simply slides down on the version list (current settings are the default "keep 3 versions"). So the file has not been removed per se and the file attachment space is unchanged (unless I happened to have 3 versions in there previously in which case I assume the oldest one would effectively be deleted). SEE SCREENSHOT.
I tried executing the delete button 3 times but that is apparently is not understood by Quickbase as a "new version" - I assume because nothing has really changed for the current version.
So now I am thinking the easiest fix would be to change the properties on the file attachment field to only Keep 1 version - I believe all prior versions would be immediately removed but thanks for confirming.
Before I take that action thought. I did find this old discussion which seems to suggest there is an additional VERSION PARAMATER that may be helpful. I experimented a little bet with trying to add something like Mark had suggest but got no love.
URLRoot() & "db/" & dbid() & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_9="
& "&delfile_fid_9=1"
& "&vid=1";
I tried several different options for changing the VID but nothing changed the results - a new "deleted version" was added and the older versions were still there.
------------------------------
Mike Gerrity
------------------------------
- MarkShnier__You2 years agoQrew Legend
I had something very similar happen to me.
I'm not sure how many versions you are trying to retain, but assuming that you only need to retain 1 version, change that value to something and then change it back to keep 1 version and it might instantly fix the issue.
But if you actually do need to keep more than 1 version, I don't have an answer
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------