Triggers: Difference between revisions

791 bytes added ,  14 November 2016
m
no edit summary
mNo edit summary
mNo edit summary
Line 79: Line 79:
This event starts when a user has requested that a new entry be added to the library, normally by pressing the '''<big>+</big>''' button on the Entries List screen. It ends after the entry is saved to storage or else not, depending on the processing.
This event starts when a user has requested that a new entry be added to the library, normally by pressing the '''<big>+</big>''' button on the Entries List screen. It ends after the entry is saved to storage or else not, depending on the processing.
==== Phases ====
==== Phases ====
'''[[TBD]]'''
; Opening an Entry Edit card (synchronous): The script will be called once the Entry Edit card is open and before any days is displayed. Initial field values (defaults) may be set.
 
; Before saving the entry (synchronous): The script will be called after the user has pressed the '''<big>Checkmark</big>''' icon and before the entry had been saved to storage. The entered data may be validated; if validation fails, the save may be forestalled and control sent back to the Entry Edit card so the user may fix the errors. Once the data is validated, this phase is an opportunity for many other functions to be performed.
 
; After saving the entry (asynchronous): The script will be called once the save of the entry had been initiated and will continue in parallel with final processing of the new entry.
 
=== Updating an entry ===
=== Updating an entry ===
This event starts when a user has requested that an existing entry be edited (updated) within the library, normally by pressing the '''<big>Pencil</big>''' button on the Entry View card. It ends after the entry is resaved to storage or else not, depending on the processing.
This event starts when a user has requested that an existing entry be edited (updated) within the library, normally by pressing the '''<big>Pencil</big>''' button on the Entry View card. It ends after the entry is resaved to storage or else not, depending on the processing.