In this chapter, you will learn how to find out information about the currently open form.

If you need to find out information about the currently opened form, such as table identifiers, flag, whether the form is displayed as an edit form or read-only record detail in the widget, or you need to read/change the model of the parent form, the doo.model.modelMetadata property is designed for that.



  • doo.model.modelMetadata.currentForm
    Metadata of the opened form (table ID and name, level of nesting).
  • doo.model.modelMetadata.currentForm.level
    Level of nesting in the hierarchy of open forms - the form at the first level has level = 1.
  • doo.model.modelMetadata.currentForm.tableId
    ID of the table to which the open form belongs.
  • doo.model.modelMetadata.currentForm.tableInternalName
    Internal name of the table to which the open form belongs.
  • doo.model.modelMetadata.currentForm.tableName
    Header of the table to which the open form belongs.
  • doo.model.modelMetadata.currentForm.isWidget
    Whether the script was called from a form detail as a widget.
  • doo.model.modelMetadata.parentModel
    Metadata of all hierarchically opened parent forms.
  • doo.model.modelMetadata.parentModel.modelMetadata
    Metadata of the parent form and its all hierarchically opened parent forms.
  • doo.model.modelMetadata.parentModel.hideCategory
    It hides the whole category (tab) on the form.
    Internal record identifier.
  • doo.model.modelMetadata.parentModel.infotext
    Assign a message to this property in case you want to show something in the form header.
  • doo.model.modelMetadata.parentModel.isReadOnly
    Makes the whole form read-only.
  • doo.model.modelMetadata.parentModel.isValid
    When you set whole model as invalid, it is not possible to save the form.
  • doo.model.modelMetadata.parentModel.selectCategory
    Select category (tab).
  • doo.model.modelMetadata.parentModel.showCategory
    This shows category (tab) again.
  • doo.model.modelMetadata.parentModel.ver
    Represents the internal record version.