ISShape.GetParentForm

Description

This function returns the parent form of the specified shape.

Syntax

object.GetParentForm( [aFormTypeName])

Part Attribute Type Description
object Required
The object always implements the ISShape interface
aFormTypeName Optional
string
The name of the form type

Return Value

ISProfileForm

Returns the parent form of the specified shape.

Example

Display the short name of the form for the control and some information of all parent controls in the hierarchical tree starting from the specified shape.

sub main()
  Dim aShape
  Dim aShapeInfo
  Dim aForm

  Set aShape = Form.Controls_("Shape1")

  set aForm = aShape.GetParentForm("TIVisualForm")
  aShapeInfo = "Form: " & aForm.ShortName  & vbNewLine & vbNewLine

  do while not aShape is nothing
    aShapeInfo = aShapeInfo &_
      "ShortName: " & aShape.ShortName & vbNewLine &_
      "TypeName: " & aShape.TypeName & vbNewLine &_
      "---------" & vbNewLine
    set aShape = aShape.Parent
  loop  
  
  Profile.MsgBox(aShapeInfo)
end sub  
Note: This macro should be executed in any event handler of the form control.

In Profile Client v8 on User Interface Parent Form can be found in Maintain > Templates > Health Record Collection Templates > Open the selected form template > Open form editor > Object Inspector.

Version information

Added in v7.8.0