LUA object: notification

The object represents a notification sent by the program.

AvailabilityThe object is returned by a method or a property of another object
notification     = program.newnotification()
notification.adduser("help@d-one.info")
notification.title = "notification"
notification.description = "test notification"
notification.actionallert()
notification.datereminder = dataview.getvalue("data_scadenza")
notification.typebefore = 1
notification.save()

actionallert

DescriptionSets the notification as an alert
Value Type
Formatnotification.actionallert()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
notification.actionallert()

actionemail

DescriptionSets the notification as email type
Value Type
Formatnotification.actionemail(email)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
emailstringThe email to send the notification to
Examples
notification.actionemail("info@d-one.info")

actionopendataview

DescriptionSets the notification as an alert with the option to open an associated form
Value Type
Formatnotification.actionopendataview(tablename, gguid)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
tablenamestringThe table containing the record to be loaded
gguidstringThe unique identifier of the record
Examples
notification.actionopendataview("orders","XXX-XXX")

adduser

DescriptionAdds a user to the notification so that they also receive it
Value Typeboolean
Formatboolean = notification.adduser(username)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
usernamestringThe email or username of the user to be added
Examples
bool = notification.adduser("info@d-one.info")

addvaluetemplatemail

DescriptionAdds a value to the parameters used to compose the email template
Value Type
Formatnotification.addvaluetemplatemail(key, value)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
keystringThe key of the parameter
valueobjectThe value of the parameter
Examples
notification.addvaluetemplatemail("namecustomers","Bob")

clearvaluetemplatemail

DescriptionRemoves all template mail parameters from the notification
Value Type
Formatnotification.clearvaluetemplatemail()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
notification.clearvaluetemplatemail()

datecreation

DescriptionSets the creation date of the notification, in timestamp format
Value Typedouble
Formatdouble = notification.datecreation
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

datenotification

DescriptionSets the date in timestamp format for when the notification should appear or the email should be sent
Value Typedouble
Formatdouble = notification.datenotification
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

datereminder

DescriptionSets the date in timestamp format for the notification reminder
Value Typedouble
Formatdouble = notification.datereminder
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

dateuntil

DescriptionSets the deadline for when the notification should be automatically rescheduled
Value Typedouble
Formatdouble = notification.dateuntil
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

delete

DescriptionDeletes the notification from the database if it has been previously saved
Value Typeboolean
Formatboolean = notification.delete()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
Examples
notification.delete()

description

DescriptionSets the description displayed in the notification
Value Typestring
Formatstring = notification.description
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

gguid

DescriptionReturns the unique identifier of the notification used to save it in the database
Value Typestring
Formatstring = notification.gguid
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

hide

DescriptionSets or retrieves the value that identifies whether the notification should be shown in the notifications list or not
Value Typeboolean
Formatboolean = notification.hide
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

idtemplatemail

DescriptionSets the template of the email that will be sent by the notification
Value Type
Formatnotification.idtemplatemail(value)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
valueintegerThe numerical value of the ID retrieved from the Brevo email sender manager
Examples
notification.idtemplatemail(105)

listusers

DescriptionReturns the list of users currently associated with the notification
Value Typelist<string>
Formatlist<string> = notification.listusers()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS

read

DescriptionSets or retrieves the value that identifies whether the notification has been read or not
Value Typeboolean
Formatboolean = notification.read
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

removeuser

DescriptionRemoves a user from a notification
Value Typeboolean
Formatboolean = notification.removeuser(username)
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS
ParameterValue TypeDescription
usernamestringThe email or username of the user to be removed from the notification

repetition

DescriptionSets the repetition value of the notification
Value Typeinteger
Formatinteger = notification.repetition
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

save

DescriptionSaves the notification in the database
Value Typeboolean
Formatboolean = notification.save()
TypeMethod
SystemsWindows, Web, Android, IOS, Mac OS

title

DescriptionSets the title of the notification
Value Typestring
Formatstring = notification.title
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS

typebefore

DescriptionSets the type of time interval used for the reminder
Value Typeinteger
Formatinteger = notification.typebefore
TypeProperty
SystemsWindows, Web, Android, IOS, Mac OS