Archive

Posts Tagged ‘Form’

Check to see if form is in “Filter in Place” mode

January 16th, 2011 No comments

Here is the way to check a form’s mode in script.

If Instr(1, ucase(ThisForm.Caption), “(FILTER IN PLACE)”) > 0  Then
ReturnValue = “-1”
Exit Sub
End If

Categories: Development, SQL, VB .Net Tags: ,

Events For Non-Query Forms

January 3rd, 2010 2 comments

For Syteline programmer, when doing the form personalization, it is important to understand the various event sequence for Syteline Forms, so you can know where to put your customized logic in. The following list outlines the sequences of events during form execution for non-query forms.

1. Form initialization

StdFormPredisplay is always the first event to fire. At this point, the components are all created, and the caches, if any, exist and are initialized, but have not yet been loaded with data.

Depending on the initial command, the events generated vary:

Refresh (after the refresh is performed):

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

New (after the new is performed)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted

Filter (by query):

StdFormLoadBoundValues

StdFormLoadDerivedValues

Meanwhile, the filter form is launched; nothing further occurs until the user finishes with the filter form.

FilterInPlace

The form enter filter-in-place mode; the normal events are generated once the user cancels or executes the filter-in-place.

Default (initialize with auto-insert new if new is enabled)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted (only if new is enabled and the auto-insert new took place)

Event custom (as defined by the developer)

2. New, including auto-insert new

StdObjectNew

StdFormGetBoundValues

StdFormPerformValidations

StdFormValidationsCompleted

(at this point, the new object is actually inserted into the cache, and becomes the current object)

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectNewCompleted

3. Delete

Due to navigating away from unmodified auto-insert row

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectDeleteCompleted

Marking existing record deleted

StdObjectDelete

StdFormGetBoundValues

StdObjectDeleteCompleted

Deleting new record

StdObjectDelete

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectDeleteCompleted

4. Navigation (substitute “Previous”, “First”, or “Last” for Next for those cases):

StdObjectNext

StdFormGetBoundValues

StdFormPerformValidations

StdFormValidationsCompleted

StdFormLoadBoundValues

StdObjectNextCompleted

5. Refresh

StdObjectRefresh

StdFormGetBoundValues

StdFormLoadBoundValues

StdObjectRefreshCompleted

6. RefreshCurrent

StdObjectRefreshCurrent

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCurrentCompleted

7. Filter by query

StdFormFilter

variety of events from query form

StdFormCalledFormReturned

(Query form)StdFormClose

If query form returns Ok

StdObjectRefresh

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

8. Filter in place

Ending with Execute:

StdFormFilterInPlaceBegin

StdFormGetBoundValues

StdFormFilterInPlaceExecute

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

StdObjectRefreshCompleted

Ending with Cancel:

StdFormFilterInPlaceBegin

StdFormGetBoundValues

StdFormFilterInPlaceCancel

StdFormGetBoundValues

StdFormLoadBoundValues

StdFormLoadDerivedValues

9. Form close

StdFormClose

10. Focus change from one component to another, whether by keyboard or mouse:

If there is a lose focus event specified for the component losing focus, and if the previously current component’s data is modified, then the following occurs for the previously current component:

If the component has the validate immediately attribute:

Move the value to the data source if variable- or standard-object bound, but without refreshing dependents of data source.

Run validators; if this succeeds, then the component modified flag is turned off.

Notify dependents of component to refresh themselves.

Place the value to the data source again (for variable- or standard-object-bound components), this time refreshing dependents of data source.

If there was no validation error, and data changed event specified, generate the data changed event.

If there is a gain focus event specified for the component receiving the focus, the gain focus event is generated.

11. Data modification to a component:

If the modification is “immediate” (selection from a drop-down, selection change in a list box, or clicking a check box or radio button):

Component is marked modified.

If the component is standard-object-bound, then the current object is marked modified.

If the component has the validate immediately attribute:

Move the value to the data source if variable- or standard-object-bound, but without refreshing dependents of data source.

Run validators; if this succeeds, then the component modified flag if turned off.

Notify dependents of component to refresh themselves.

Place the value to the data source again (for variable- or standard-object-bound components), this time refreshing dependents of data source.

If there was no validation error, and data changed event specified, generate the data changed event.

Otherwise: no events are generated, but the following flags are adjusted:

Component is marked modified.

If the component is standard-object-bound, then the current object is marked modified.

Categories: Development, VB .Net Tags: , ,