Delete all button

Delete all button

Hello all,

I am trying to find a way to create a delete all button function, to clear all records from an entities. As it's annoying trying to delete records one-by-one. Especially the users in the User Espace.

Please let me know if you need more detail. 

anthony c.
Hi Anthony,

Create an advanced query with

Delete * from {YourEntity}

(and since the advanced query requires an entity output, use the YourEntity as output)

João Rosado
The way you delete should take in account your data model. In your example, if you try to delete all records from [users] you will have an error for constraints dependencies (you probably have used somewhere the [user].id !)
Thus, depending on the case, you should iterate your records and their dependencies in order to delete any.
Santiago Suárez

Thank you for the replies guys, I'll test it out in a minute.
and, did it work as expected?

Oh sorry for that, we were having issues with the system, so I didn't get to look actually until after.

Anyways, no I couldn't figure it out, so instead I just copied the how the Remove Selected Roles/Groups function works from within the Users Espace and that way worked the way I wanted to. That way I don't go ahead and delete the Administrator or anything, I can just delete the ones that I don't want.