You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new feature would hinge on the presence of dform entries with a "populate" property.
When a dform is run on an object, the following newly happens:
entries without "populate" properties are displayed
an array of the "populate" entries is constructed
the populate function of the first entry is run, with the array from 2 as its argument
The populate functions expect to take a form object and an array of entries. When called, they shift their entry off the front of the array, asynchronously populate the form input, and run the next populate function, sending it as arguments the form object and the array containing the remaining entries.
In this way, the "populate" entries are asynchronously populated in sequence, one after another. The dform would be fashioned so that the entries are listed in order of dependency - i.e. if entry X depends on entries A, B, and C, it would be listed after A, B, and C.
For example, a dform to generate a "last interval plus offset" interval would look like this:
date
aid
long_desc
remark
sid (populate)
schedule intervals (populate)
existing intervals (populate)
interval start (populate)
interval end (populate)
The "sid" entry populate function would look up the SID (Schedule ID) of the current employee.
The "schedule intervals" populate function would look up the schedule intervals for that day.
The "existing intervals" populate function would look up existing attendance intervals for that day.
The "interval start" populate function would derive the interval start time from the schedule intervals and the existing intervals.
The "interval end" populate function would compute the interval end time by adding the offset to the interval start time.
The text was updated successfully, but these errors were encountered:
a populate module/function has been added in App::MFILE::WWW core
the dform code in start.js has been modified to construct an array of the populate functions associated with the dform's entries and run "populate" on it
an idiom for writing the populate functions has been developed
The new feature would hinge on the presence of dform entries with a "populate" property.
When a dform is run on an object, the following newly happens:
The populate functions expect to take a form object and an array of entries. When called, they shift their entry off the front of the array, asynchronously populate the form input, and run the next populate function, sending it as arguments the form object and the array containing the remaining entries.
In this way, the "populate" entries are asynchronously populated in sequence, one after another. The dform would be fashioned so that the entries are listed in order of dependency - i.e. if entry X depends on entries A, B, and C, it would be listed after A, B, and C.
For example, a dform to generate a "last interval plus offset" interval would look like this:
The "sid" entry populate function would look up the SID (Schedule ID) of the current employee.
The "schedule intervals" populate function would look up the schedule intervals for that day.
The "existing intervals" populate function would look up existing attendance intervals for that day.
The "interval start" populate function would derive the interval start time from the schedule intervals and the existing intervals.
The "interval end" populate function would compute the interval end time by adding the offset to the interval start time.
The text was updated successfully, but these errors were encountered: