DMXzone Server Connect Support Product Page

This topic is locked
Answered

Response action

Asked 28 Jul 2016 00:31:46
1
has this question
28 Jul 2016 00:31:46 Steven Irwin posted:
I have an action with multiple steps and I want to set a response for responsive notify to show the response eg. I have product category delete action that first checks to see if there are any products in that category. If yes, do not delete and set response explaining why (to be displayed in responsive notify). If no, delete the product category and set the response to say success.
I have the logic working fine but I can't get the response message to be displayed by responsive notify.
Can you provide some documentation on how to use the response action?

Replies

Replied 04 Aug 2016 13:15:30
04 Aug 2016 13:15:30 Steven Irwin replied:
I am still waiting for an answer. Please advise
Replied 08 Aug 2016 07:28:26
08 Aug 2016 07:28:26 Teodor Kuduschiev replied:
Hello Steve,
The response cannot be used that way.
Set response can be used to provide a specific error with a status 400, and custom error text. So just set the status to 400 and enter your error message.
Then this status can be displayed on the page, using the lastError response binding on an area of your page:


Currently there is no way to run the responsive notify using the set response step.
Replied 08 Aug 2016 07:32:10
08 Aug 2016 07:32:10 Steven Irwin replied:
Thanks Teodor.
Replied 20 Sep 2016 20:01:13
20 Sep 2016 20:01:13 Neil Stratton replied:
I've been having a very similar issue to this myself, and from a lot of trial and error have managed to do exactly what you're after.

The 3 events I've found useful are onComplete, onSuccess, onError.

onComplete happens regardless of the outcome, and you can do what Teodor has suggested above and set a 400 error with custom text, and display that in response notify.

onSuccess happens when you have no response, so the success part of my condition simply completes the database operation and then finishes. This event happens and you can display your success message with response notify.

onError happens when you set a response with an error code as Teodor mentioned above. You do not need to give the response a name, but you must enter a status and text. For status I've been using 499, as this is a HTTP status code that isn't used, and for text I've just put a space, but any text will do as long as the field isn't blank. This makes the onError event happen and you can display your error message with response notify.

Hope this helps! Using it in my project and it seems to be working
This reply was removed on 7/10/2023 7:32:11 AM.
See the changelog
Replied 28 Dec 2022 04:38:30
28 Dec 2022 04:38:30 User  replied:
How long do we have to comply? Can we extend the time for a response? lewdle
This reply was removed on 7/10/2023 7:32:08 AM.
See the changelog

Reply to this topic