Skip to main content
Skip table of contents

Python Events

Die nachfolgenden Inhalte sind nur in englischer Sprache verfügbar.

Data-Driven Events

Method Parameter Return valueComment

some_event(dtp_record, event)

dtp_record: the record triggering the event

event: the event itself

bool

Example

  • To block saving/deleting you can create a pre-save/delete event that returns False when required. In this example we prevent the deletion of a record that has its “active” flag set:
PY
def prevent_deletion_event(dtp_record, event):
	if dtp_record.active.get_value():
		return False
	return True
  • We then create an event record for the table the record is in, set the event type to “pre-delete”, function type to “python”, insert the path to this event function and enable the “active” flag of the event
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.