Problem with {fn:check_delete_result}

How to fix missing success or error messages after a delete action in ChronoForms.

Overview

The issue occurs because the {fn:check_delete_result} function is not correctly detecting the outcome of the delete operation due to a change in how save/delete functions return data.
Instead of using {fn:check_delete_result}, check if the variable from your delete function is empty. Use {var.empty:delete_function_name} to determine success or failure and display the appropriate message.

Answered
Connectivity v6
Fr Fredolino 20 Jul, 2019
Hi,

I wanted to ask if there is a problem with the "check-messages".
The messages are displayed when editing but if I have saved data or now when checking for deletion no messages are displayed.
For example:

Event-Tab:
{fn:delete_article}
{fn:check_delete_result}
{redirect:index}

Thanx F.
he healyhatman 21 Jul, 2019
Well what do you have in check_delete_result?
Fr Fredolino 21 Jul, 2019
Hi,

this in data provider:
{var:save_beob_new}

this in values setup:
true:{success:beob saved successfully.}
false:{error:saving the beob failed.}

just i have delete this check and display only the message with {success: message…..} in view events
:-)
he healyhatman 22 Jul, 2019
Answer
1 Likes
Scratch that never mind

There was a change to the save data functions several versions ago, you need to check for {var.empty:savefunction}

If the save was successful the savefunction returns a copy of the data it saved. If it fails it will be empty.
This topic is locked and no more replies can be posted.