How to create a notification for error?

#1

Hi,

I try to create notification for "Error".

Here is my part of code. I implement this code at templateForm's "submit button".

It will be trigger at "Click" event.

return this.httpClient.post(url3,data1,options1).toPromise()
.then((response: any) =>{

            return (response);
       })
       .catch((err: any) =>{
             
            return(err);
       });

The "success" notification can be triggered. If the condition is ${result === null).

I try to configure "Error notification". If the condition is ${result !== null), the condition can not be trigger. Does anyone what the correct configuration should be used ?

Regards,

Paul Wang

0 Likes

#2

Hi Paul,

Usually you should use TemplateForm Submit event and you can customize everything using the designer:

Best Regards,
Vladimir

0 Likes

#3

Hi Vladimir,

I follow your suggestion to move my code to "Submit". I still have the problem to trigger "Error Notification".

  1. I can trigger "Success Notification". I setup "condition" -- > ${result === null}, Because my api will return 'null' , if the api is executed successfully.

  2. My api will return "non null object", if the api is executed with error.
    What should I setup for "condition" item ?

Regards,

Paul Wang

0 Likes