Form Navigation response types

Event handlers with one of the form navigation response types run or execute a form based on an event. For each of these response types, you specify the name of the target form and the filter to apply to the target form.

Response type Description
Run Form Launches the specified form. The current form continues to run and is available to the user.
Run Form as Modal Child Launches the specified form. The user is not able to interact with the original form until the specified target form is closed. At that time, control returns to the original form.

The Run Form as Modal Child response type allows you to use the OK/Cancel Optional parameter. Normally, WinStudio displays the OK or Cancel prompt when users select the Close box to exit a modal child form. The OK/Cancel Optional parameter eliminates this prompt. When users click the Close box, the form closes and indicates that the user exited the child form without executing a Cancel action or an OK action. The WinStudio API exposes this information during the generation of the standard event StdFormCalledFormReturned.

Goto Form Closes the current form and launches the specified form.
Run Form as Linked Child Same as the Run Form response type except that WinStudio manages the parent-child relationship defined between the two forms. Typically, the data presented in the child form is related to data presented in the current IDO item presented on the parent form. When the parent form is navigated, the child form is automatically refreshed.

The Run Form as Linked Child response type takes several special parameters. First, you must specify the Linkby parameter. The parameter consists of pairs of properties, one from the parent form and one from the child form, that are used to filter the child form. The Linkby specification determines the following behaviors:

  • The child form is populated by those IDO items whose properties match the values of the parent form properties. The filter is reset and the child form is refreshed every time the parent form is navigated.
  • WinStudio automatically propagates the parent properties to the corresponding child properties for any new items saved from the child form.
  • Child form components that are bound to linked properties are made read-only.

The Run Form as Linked Child response type allows you to set variables in the child form every time the parent form is navigated. Specify the variables you want to set on the child form as the target variables. For each target variable, specify the value you want to assign to it. This value specification may include the standard substitution keywords and may reference properties, components, and variables from the parent form.

The Run Form as Linked Child response type takes a parameter to refresh the current item on the parent form any time the child form's primary collection is saved. To cause this behavior, select the Reload After Child Save parameter. Use the parameter in cases in which saving the child form might cause data in the parent form's current item to become obsolete.

Run Form to Retrieve Filter Runs a form as a query form for the current form. When the query form exits, its filter criteria are returned to the current form.

Setting variables

You can set variables on the target form. To do so, use the event handler's Set Values parameter and specify the variables you want to set on the target form as the target variables. For each target variable, specify the value you want to assign to it. This value specification may include the standard substitution keywords and may reference properties, components, and variables on the original form.

相关主题