Deleting Multiple Records based on a condition
![artrab](https://us.v-cdn.net/6037124/user_avatars/2182189.jpg)
I was thinking also of creating stack of functions like :
1. Query All records that satisfy the condition then
2. Delete all the results from number 1.
Is this possible?
Thanks.
Comments
-
Yup! You just need to loop through the results of your query
-
I watched the video and just a wow, that was easy to implement. Thanks !
-
Argh. It's not intuitive that the delete record function only deletes one at a time. When I delete record where item.feature_id = input, I expect to delete all matching records with feature_id equal to the input. I believe based on a few hours of troubleshooting (can you confirm) that delete record would only delete the first such match.
-
https://docs.xano.com/guides/data-manipulation/deleting-data/deleting-multiple-records
@Xanoguy it should delete all rows in your item table's where column feature_id matches input. I don't know if you have seen the above video by @Michael Udinski. It should provide some clarity even though it uses a list input (list of product IDs) in this case.
-
Thanks Alimama. I did watch that video, and since Michael used a For-Next loop (again) in that video, it was one of the reasons I concluded you couldn't delete multiple records with the one delete function.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback