Hi, I am trying to create a delete function which will delete a selected record. I have had a look at muneer’s suggestion at this link: Profile - muneer - Community and I am not sure if it pertains to my required ‘single row delete’ requirements or to a ‘delete all records’. I suspect the former to be the solution.
I have my app variable data set up as below:
Using a record called “TESTDELETE” for my example I shall try to explain what I have achieved so far (see below):
I wish to delete the “TESTDELETE” from my Source Data Google Sheet “FVENTRYFORM”
When the user clicks the “Delete” button the first of two error messages (FVYesNoLabel) appears to warn the user of their actions (see below)
The user then has the option to proceed or not by clicking either the, now displayed, “Delete” or “Cancel” button. If, at this point, the user decides to click the “Delete” button they are faced with a final message in the form of the alert (FVDeleteAlert1) shown below:
When “Confirm” is clicked, the “TEST DELETE” record in question should then be deleted from the Source Data Google Sheet “FVENTRYFORM”.
Looking at my blocks below and then looking at muneer’s solution, I am wondering how to implement it into my project.
My blocks:
The problem I am having is in the “When/BtnFVDelYes/click” block after I call the “FVDeleteAlert” alert msg. Because this is first time I have tried to use the “wasConfirmed” blocks I am not sure how to make them delete the “TESTDELETE” record and briefly display a “Record Deleted” msg.
This was when I found muneer’s solution ( image below) which suggested to me that my approach must be wrong but I am not sure how to incorporate his solution into my blocks.
In the “for row id” socket would I use my "row_data" or “row_number” variable or something else completely?
Do I put muneer’s blocks in my “When/BtnFVDelYes/click” blocks, and if so, where?
I am very confused and suffering with “block blindness”.
Andos.