Simple delete button for the current record
How can i create a simple delete button for the current/open record?
Layout element > button > formula
Many thanks, Maarten
9 replies
-
Hi Maarten,
You can use the formula
delete()
But please be aware: If you only use that formula it will delete the data record imediately.
More information about that function you will find in our User Manual here:
https://ninoxdb.de/en/manual/calculations/reference-of-functions-and-language
We would suggest to use the waste basket symbol in Ninox in order to delete the current record.
Best, Jörg
-
Hello Jörg,
Many thanks, I'm using it for Todo items that don't need an extra confirmation.
The correct formula is
delete(this)
Best, Maarten
-
Hi,
how can I get a confirmation pop up before delete the record?
Thanks.
-
Refer to the dialog function..
dialog("Delete", "Are you sure you want to delete this record?", ["OK", "Cancel"])
Be advised .. dialog does not work the same in all platforms and will not fire with all triggers.. so best to put it behind a button..
-
let result := dialog("Warning", "Are you sure?", ["Yes", "No"]);
if result = "Yes"
alert("Deleted");delete (this)
else
alert("Canceled")
endSteven
-
Oops...
-
Hi, tried but Im getting this error , any ideas ?
-
It should be :
let result := dialog("Warning", "Are you sure?", ["Yes", "No"]);
if result = "Yes" then
alert("Deleted");delete (this)
else
alert("Canceled")
endSteven.
-
Thanks ¡¡ works great
Content aside
- 4 yrs agoLast active
- 9Replies
- 4070Views