IFormLayout.GetDataFieldUsage method
GetDataFieldUsage
DataFieldUsage GetDataFieldUsage(String dataFieldName)
Referenced types: DataFieldUsage
Retrieves the usage of a specific DataField in a FormLayout.
Parameters
| Parameter / type | Description |
|---|---|
dataFieldNameString |
Name of the DataField to be queried. |
Returns
A valid object instance or null
See also
Sample: To query all DataField-objects within a stand-alone IFormLayout refer to the code below. The same principle can be used for a Repository-based IFormLayout.
' Retrieve the global Project '
' A stand-alone FormLayout contains only the global Project, the global Project holds the FormLayout and all DataField definitions '
Set project = repository.GlobalProject
' Retrieve the one and only FormLayout within the stand-alone FormLayout '
Set formlayout = project.FirstFormLayout
' Iterate all DataFields within the Project '
Set datafield = project.FirstDataField
While Not (datafield Is Nothing)
sOut = datafield.Name
' Retrieve the usage of the DataFields in the FormLayout '
Select Case (formlayout.GetDataFieldUsage (datafield.Name))
Case DataFieldUsage_Calculated: sOut = sOut & " --> The value of this DataField is computed within the FormLayout"
Case DataFieldUsage_Invalid : sOut = sOut & " --> Invalid usage - contact TEC-IT"
Case DataFieldUsage_Normal : sOut = sOut & " --> The DataField is used within the FormLayout; its value can be set"
Case DataFieldUsage_NotUsed : sOut = sOut & " --> This DataField is not used in this FormLayout"
Case DataFieldUsage_Parameter : sOut = sOut & " --> This is a system DataField (like the page number) used within the FormLayout"
End Select
MsgBox sOut, vbOKOnly, "DataField"
Set datafield = datafield.Next
Wend