How to use utils.showNotification in detail?

How to use utils.showNotification in detail?

You would want to use this as an event handler after a specific action has taken place.
What are you trying to do? Some context will help me understand and will help me help you

Hey @Kai1!

utils.showNotification({ title?: String, description?: String, notificationType?: String, duration?: Number })

utils.showNotification shows a notification message on the top right corner of the screen for duration seconds (default 4.5s). You can use this to display messages like error messages after a query fails for example. Supported notificationTypes are : "info" | "success" | "warning" | "error"\

It accepts an object where you can define a title, description, type, and duration. The info type looks like this:

success like this:


and error:

This can be run in any JS query or most places that scripts can be run. Hope this helps, let me know if you have any questions! :slight_smile:


@Chris-Thompson thank you for the explanation!

Is there a way to programmatically clear the error notifications when a subsequent successful call/event is made? Currently, I am using query event handlers to display error notifications, and I would like them to be cleared once a successful call of the query is made.

I do not want to clear the error notification by using duration. On this note, is there a way to display a notification indefinitely?

1 Like

Hey @kkolur — great question! I don't believe this is currently possible but would be a great feature. Would you mind posting this as a feature request on the community so that other users who are interested can chime in on this?