Forum Discussion
One solution is to take away the permissions for normal users to delete. And please give them a check box on the expense records called [Request Deletion].
Then have a pipeline watch for that checkbox and delete the record. I think you will find that if 100 records are deleted the pipeline will fire 100 separate times and the app will see that as 100 single record update Notifications.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
That's the solve for now, though I used a webhook instead of a pipeline so it would happen instantly. I used a button push instead of a checkbox, so they are forced to delete one by one.
------------------------------
Mike Tamoush
------------------------------
- MarkShnier__You2 years agoQrew Legend
Can you post your multi record webhook code? It mjkst use the Repeat On syntax?
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------- MikeTamoush2 years agoQrew Commander
Since I am forcing a button push, I used API_DeleteRecord which is pretty simple, but wont work for multi record. However, I was just watching the Kirk Trachy video, and think I know what the code would be for multi delete. Ill post it shortly let me grab it.
------------------------------
Mike Tamoush
------------------------------ - MikeTamoush2 years agoQrew Commander
Below is my best guess, but untested. It would use API_PurgeRecords (rather than API_DeleteRecord). I tried to adapt using what is at the 10 minute mark in this Kirk video.
https://www.youtube.com/watch?v=-eY6ZAivCZY
In his video he is not deleting the record that triggered it, but rather a related record. Also, in the middle of his explanation he realizes he has an error, and has duplicated some of the code. But he doesnt fix it on video, so I am using my best guess on how it would work. Worst case, we can duplicate his 'error' because his actually still works, it is just not clean code.
<qdbapi>
<usertoken>enter user token here</usertoken>
<apptoken>enter app token here</apptoken>
<udata>mydata</udata>
<query>
%RepeatOn%{'3'.EX.[Record ID#]}%RepeatOff%
</query>
</qdbapi>
**Also, I would test this in a test environment, as the API help page says if there is no query, all records in the table will be deleted. Not sure what happens if your query just isnt right.....but seems risky for sure so use with caution.
------------------------------
Mike Tamoush
------------------------------- MarkShnier__You2 years agoQrew Legend
I have used API_PurgeRecords in an URL formula button and forgot to add the &qid=.... and from experience I can confirm that you can accidentally (but very efficiently) purge a whole table.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------