Delete or update data row

Hello everyone,

I am wondering if anyone has done something similar, daily I send customized emails to different customers, I usually just copy their email addresses.

Is it possible to create a table in Data Blaze where I can select an email address from the email row and once the snippet has been inserted that row gets archived or deleted so I don't have to be scrolling down?

Thank you in advance :slight_smile:

Hi @angellara ,
Yes, you can definitely use a snippet to update/delete a row once you insert the snippet.
Here is two ways you can do it.

Using soft delete

{dbselect: SELECT email, contact, rowid() AS rowid FROM Contacts WHERE not archieved ; space=id; menu=yes} {dbupdate: UPDATE Contacts SET Archieved=yes WHERE rowid() = rowid; space=id}
Hi {=email},
We have initiated your order. Please contact {=contact} for more information.
Regards,

  • Vinod

Using hard delete

{dbselect: SELECT email, contact, rowid() AS rowid FROM Contacts; space=id; menu=yes} {dbdelete: DELETE FROM Contacts WHERE rowid() = rowid; space=id}
Hi {=email},
We have initiated your order. Please contact {=contact} for more information.
Regards,

  • Vinod
1 Like

Thank you so much, Vinod!

This is what exactly I was looking for :slight_smile: