Notifications (Error, Warning or Info)

Notifications are useful for your scripts to tell the user what went wrong or even debug. Enjoy!

from Spotfire.Dxp.Framework.ApplicationModel import NotificationService
notificationService = Application.GetService[NotificationService]()

notificationService.AddErrorNotification("Error title","Error summary","Error details")
notificationService.AddInformationNotification("Info title","Info summary","Info details")
notificationService.AddWarningNotification("Warning title","Warning summary","Warning details")


Manu Mohan.c said...

can we hide this notification message from web player?

Jose Leviaguirre said...

Yes Manu, you can put a conditional statement to check if the client is webplayer or not: