Repository Access

Native C API

Access and modify Repositories or stand-alone FormLayouts.

Overview

A Repository is represented by a master file (extension *.tfr) and a subfolder structure on the file system. It references an arbitrary number of user-defined Project objects. These user-defined Projects are used to divide a Repository into logical areas. Each Project is a container which holds DataField definitions, DataSource definitions and references an arbitrary number of FormLayout objects.

The so-called GlobalProject is allocated by default and is used to define DataFields and DataSources which are available for all FormLayouts regardless of their actual Project membership.

Note

In contrast to a stand-alone FormLayout, the GlobalProject of a Repository can not store references to a FormLayout.

Examples

To open a stand-alone FormLayout do the following:

  // Connect to a stand-alone FormLayout (extension *.tff)
  // Examples are usually installed in
  // - Windows Vista or later: C:/Program Data/TEC-IT/TFORMer/9/Examples
  // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples
  eCode = TFormer_SetRepositoryName   (hTForm, "C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples/Command Line/ODBCReportPDF/ODBCReportPDF.tff");

To open a Repository do the following:

  // Connect to a Repository (extension *.tfr)
  // Examples are usually installed in
  // - Windows Vista: C:/Program Data/TEC-IT/TFORMer/9/Examples
  // - Older Microsoft Windows versions: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples
  eCode = TFormer_SetRepositoryName   (hTForm, "C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/9/Examples/Demo Repository/Demos.tfr");
NameKindPurpose
EFieldEditModeenum Defines the edit mode of a DataField.
EFieldInitialValueSourceenum Defines how the initial value of a DataField is determined.
TFormer_AddNewProjectfunction Creates and adds a new Project to the Repository.
TFormer_DeleteProjectfunction Deletes a Project from the Repository.
TFormer_AddNewFormfunction Adds a new Form to the given Project.
TFormer_DeleteFormfunction Deletes a FormLayout from the specified Project.
TFormer_AddNewVarfunction Adds a new DataField to the specified Project.
TFormer_DeleteVarfunction Deletes a DataField from the specified Project.
TFormer_GetFirstProjectItfunction Creates a new iterator and sets its position to the first Project within the Repository.
TFormer_GetNextProjectItfunction Moves the iterator to the next Project within the Repository.
TFormer_ProjectItGetNamefunction Returns the name of the Project the iterator is pointing to.
TFormer_ProjectItGetDescriptionfunction Returns the description of the Project the iterator is pointing to.
TFormer_FreeProjectItfunction Releases the Project iterator and frees any resources associated with it.
TFormer_GetFirstFormItfunction Returns an iterator pointing to the first FormLayout in the specified Project.
TFormer_GetNextFormItfunction Move the iterator to the next FormLayout within the Project.
TFormer_FormItGetNamefunction Returns the name of the FormLayout the iterator is pointing to.
TFormer_FormItGetDescriptionfunction Returns the description of the FormLayout the iterator is pointing to.
TFormer_FreeFormItfunction Releases the FormLayout iterator and frees any resources associated with it.
TFormer_GetFirstProjectVarItfunction Returns an iterator pointing to the first DataField in the specified Project.
TFormer_GetNextProjectVarItfunction Move the iterator to the next DataField within the Project.
TFormer_ProjectVarItGetDetailsfunction Returns the details of DataField the iterator is pointing to.
TFormer_ProjectVarItGetNamefunction Returns the name of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetDescriptionfunction Returns the description of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetCommentfunction Returns the comment of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetCaptionfunction Returns the caption of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetDisplayOrderfunction Returns the display-order of the DataField the iterator is pointing to.
TFormer_FreeProjectVarItfunction Releases the DataField iterator and frees any resources associated with it.
TFormer_ProjectVarItGetDefValuefunction Returns the default-value of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetTypefunction Returns the data-type of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetEditModefunction Returns the edit mode of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetInitialValueSourcefunction Returns the initial value source of the DataField the iterator is pointing to.
TFormer_ProjectVarItGetUsagefunction Returns the usage of the DataField specified by an iterator.
TFormer_GetVarUsagefunction Retrieves the usage of the DataField specified by its name.
TFormer_GetFirstDatasourceItfunction Returns an iterator pointing to the first DataSource in the specified Project.
TFormer_GetNextDatasourceItfunction Move the iterator to the next DataSource within the Project.
TFormer_DatasourceItGetNamefunction Returns the name of the DataSource the iterator is pointing to.
TFormer_DatasourceItGetDescriptionfunction Returns the description of the DataSource the iterator is pointing to.
TFormer_FreeDatasourceItfunction Releases the DataSource iterator and frees any resources associated with it.
TFormer_GetFirstDSParameterItfunction Returns an iterator pointing to the first DataSourceParameter of the specified DataSource in the specified Project.
TFormer_GetNextDSParameterItfunction Move the iterator to the next DataSourceParameter within the DataSource.
TFormer_DSParameterItGetNamefunction Returns the name of the DataSourceParameter the iterator is pointing to.
TFormer_DSParameterItGetDescriptionfunction Returns the description of the DataSourceParameter the iterator is pointing to.
TFormer_DSParameterItGetCaptionfunction Returns the caption of the DataSourceParameter the iterator is pointing to.
TFormer_DSParameterItGetDisplayOrderfunction Returns the display-order of the DataSourceParameter the iterator is pointing to.
TFormer_DSParameterItGetDefValuefunction Returns the default-value of the DataSourceParameter the iterator is pointing to.
TFormer_FreeDSParameterItfunction Releases the DataSourceParameter iterator and frees any resources associated with it.

EFieldEditMode

enum EFieldEditMode

Defines the edit mode of a DataField.

Controls whether and under which conditions a DataField can be edited by the user in combination with a DataSource. This property is configured in TFORMer Designer to be evaluated by external programs. The TFORMer SDK provides read access only.

NameInitializerDescription
eFieldEditMode_Default= 0

No special handling.

Uses the default edit behavior defined by the data source.

eFieldEditMode_ReadOnly

The DataField is read-only and cannot be edited by the user.

eFieldEditMode_Editable

The DataField is always editable by the user, regardless of the data source.

eFieldEditMode_EditableIfEmpty

The DataField is editable only if its current value is empty.

eFieldEditMode_EditableIfValidationFails

The DataField is editable only if the current value does not satisfy the validation rule.

eFieldEditMode_Invalid

Invalid, internal use only.

EFieldInitialValueSource

enum EFieldInitialValueSource

Defines how the initial value of a DataField is determined.

Specifies the source from which the initial value of a DataField is populated when a record is loaded (e.g. from the DataSource, from the configured default value, or from the last value entered by the user). This property is configured in TFORMer Designer to be evaluated by external programs. The TFORMer SDK provides read access only.

NameInitializerDescription
eFieldInitialValSrc_Default= 0

Default behavior.

The initial value is determined by the standard rules.

eFieldInitialValSrc_DefaultIfEmpty

Use the configured default value only if the current field value is empty.

eFieldInitialValSrc_DataSource

Use the value provided by the data source.

eFieldInitialValSrc_LastValue

Use the last value entered by the user via the input mask.

eFieldInitialValSrc_Invalid

Invalid, internal use only.

Search documentation

Search in
More scopes
Additional scopes

All contents