DMXzone Server Connect Support Product Page

Answered

Delete Records

Asked 19 Oct 2015 07:56:51
2
have this question
19 Oct 2015 07:56:51 Greta Garberini posted:
I just watched the video for "Delete Records" with Server Connect and what is still missing, is a confirmation routine before you actually delete something from your database. This is a MUST of obvious resons!
Whenever you set an action with such a permanent effect, there should be a question like "are you sure?" with a possibility to cancel the operation. Maybe I did not get the whole picture, because I only watched the video so far. So, please let us know how to achieve this safety routine.

Replies

Replied 19 Oct 2015 08:41:29
19 Oct 2015 08:41:29 Teodor Kuduschiev replied:
Hi Greta,
The video shows some basic functionality.
If you want to extend this, you could just add two more buttons, inside a span/div [Are you sure: Yes | No] and apply the delete action executor to the Yes button.

So you could apply a show/hide container behavior to the Delete button which:
1. Shows the [Are you sure: Yes | No] span/div and hides the Delete button container.
2. Apply a show/hide behavior to the No button, which hides the [Are you sure: Yes | No] span/div and shows the Delete button container.
Replied 19 Oct 2015 13:11:35
19 Oct 2015 13:11:35 Greta Garberini replied:
Hi Teodor,
thank you for your quick reply. Yes, your description certainly is a good idea. (I assume you mean "Delete button" when you write "Download button"
I was hoping for a "ready-made" routine, this time though; something without having to fiddle around with show/hide behaviours.
Because DMX once offered an extension which does not work anymore. (Cannot remember its name, but was quite useful to confirm such things)
Replied 19 Oct 2015 13:33:03
19 Oct 2015 13:33:03 Teodor Kuduschiev replied:
Oh, sorry, my bad - indeed i mean the Delete button.
I will discuss your idea with the developers, so they can update the extension and make it Serve Connect compatible!
Replied 19 Oct 2015 13:34:22
19 Oct 2015 13:34:22 Greta Garberini replied:
Great, thank you
Replied 03 Nov 2015 08:09:56
03 Nov 2015 08:09:56 Greta Garberini replied:
The Extension's name was Popup Confirm Message. (PopUpConfirmMsg) ...
Replied 15 May 2016 08:09:28
15 May 2016 08:09:28 User  replied:
I was searching for this functionality also. Any development?
Replied 15 May 2016 09:58:46
15 May 2016 09:58:46 Greta Garberini replied:
I use a workaround on using "Button Collapse" from dmx's "Bootstrap3 Components". I trigger it with a Collapse Button called "Delete".

Clicking it will open the area which contains two more buttons: Confirm Delete and Cancel. The Confirm Delete Button triggers the actual delete process.This seems to be the most elegant workaround.
Replied 16 May 2016 00:27:11
16 May 2016 00:27:11 User  replied:
Greta; Thanks so much. I have tried this simple method but the delete action does not run after OK button pressed.

I will go with the Button Collapse method if I can't get this going but in general is it possible to reference a dmx action in this way?

Regards

Ian Gonsal

<input name="frmdelete" type="button" id="frmdelete" onClick= "confirmDelete()" value="delete record">


<script>
function confirmDelete() {
if (confirm("Are you sure you want to delete this?") {
"dmxServerActionControl('run','namedeleteexec',{&quot;vrbldelete&quot;: &quot;{{@id}}&quot;},this)" ;
} else {
false;
}
}
</script>
Replied 06 Jul 2016 11:09:50
06 Jul 2016 11:09:50 Hans Haverlach replied:
Yes it is! But you need send the record ID with the confirmDelete({{@id}})

and then:
<script>
function confirmDelete(delID) {
if (confirm("Are you sure you want to delete this?" {
"dmxServerActionControl('run','namedeleteexec',{'vrbldelete': delID},this)" ;
} else {
false;
}
}
</script>
Works perfect!

Hans

Reply to this topic