We need to have at least two forms designed, a parent form allowing us to input data and load its child form, and the child form displaying the data passed from its parent if required. The following example (also in the attachment) basically shows how to use a Hotspot button to load a child form and pass data from a parent formâs TextField to the child formâs DynamicLabel.
Â· Open Form Properties of the child form which we want to load and pass data to, and obtain its Form ID by looking at Form Properties Ã General.
Â· Open the parent form and double-click âHotspotâ of the Designer interface.
Â· Obtain its Field Name and change Type to âScriptâ normal">
Â· Open Script Editor and find out the Hotspot function named âCtl_FieldName_AfterInkAddedâ âMF_FormBehaviorDefaultEventHandlersâ
Â· Add the following code to this Hotspot function and this will preload the child form:
_component.RequestFormLoad(Child Formâs FormID)
Â· Then add the following code to search through all loaded forms until the child form is found, assign value from the parent formâs TextField to the childâs DynamicLabel and finally activate the child form:
For Each xLF As LoadedForm In _component.Forms
If xLF.Form.FormID = "Child Formâs FormID " Then
xLF.Form.GetFormControlByName("DynamicLabel").Value = _TextField.Value
_component.ActiveForm = xLF
By activating the child form, we will bring the child form in the front of the screen after âHotspotâ