Notes | ObjectType takes a numeric value of:
- 1 Tables
- 2 Fields
- 3 Indexes
- 4 Workareas
- 5 Libraries
- 6 Public Procedures
Name takes a string value and is the name of the item you are looking to find the property for.
PropertyName is a string that should be supplied and specifies the property the function is using to return a PropertyValue for.
PropertyValue contains the value of the specified property when the function returns.
Upgrade is an optional parameter that takes the value 0 or 1.
- 0 is the default and uses the application catalog.
- 1 will specify that the catalog held within the .pub file must be used. This file must be named [appliationName].pub and should be placed in the root folder of the application.
Depending on the object type the PropertyName string can be any one of the following:
Tables
Name |
name of table |
TableLevel |
level of table in hierarchy, root table being table 0 |
DatabaseName |
|
ParentTableName |
|
NumberOfFields |
number of fields in table |
NumberOfIndexes |
number of indexes in table |
MasterItem |
original or published |
Workareas and Fields
Name |
name of field |
TableName |
name of table |
DisplayLength |
number of characters to display |
DataType |
|
DataTypeName |
Character, Date, Time, Logical, Radio, 1 - Byte, 2 - Word, 4 - Long, Number, Memo, Picture. (Note that Byte, Word and Long are all variations of the basic type 'Number'. Equinox decides internally if it can use one of these shorter forms, depending on how long the number is, and how many decimal places have been requested.)
|
Format |
|
PasswordFormat |
character fields only |
Overtype |
character fields only |
Justify |
character fields only |
ComboFormat |
character fields only |
Audited |
all fields except PICTURE fields |
MonthFormat |
all fields except PICTURE fields |
YearFormat |
date field only |
AllowWild |
date field only |
AllowCurrent |
date field only |
AllowBlank |
date field only |
NoSeconds |
time field only |
TwelveHourFormat |
time field only |
LeadingZeroes |
number field only |
DecimalPlaces |
number field only |
Unsigned |
|
NegativeFormat |
number field only |
BlankEdit |
|
NoScroll |
|
NoWordWrap |
memo fields only |
HasVerticalScroll |
memo fields only |
MasterItem |
original or published |
Comment |
The comment field for a field or workarea |
Scope |
For workareas only - returns local or public |
Index
Name |
Name of index |
TableName |
Name of table |
Reverse |
0 or 1 - this applies to each field in the index but there is only one property, so the result actually comes back as a 'bit field'. So, if index field 1 is reversed, then the 'reverse' property returns 1; however, if index fields 1 and 2 are reversed, then the property returns 3. .
IgnoreCase 0 or 1 - this applies to each field in the index but there is only one property, so the result actually comes back as a 'bit field'. So, if index field 1 is IgnoreCase, then the 'IgnoreCase' property returns 1; however, if index fields 1 and 2 are IgnoreCase, then the property returns 3 and so on. |
Global |
0 or 1 |
Primary |
1 is a table index, 0 is a query index |
Shared |
0 or 1 |
Unique |
Returns 2 for normal indexes, 1 for 'unique,nonblank' indexes |
NonBlank |
0 (normal) or 1 (nonblank). |
AuditIdentifier |
0 or 1 |
FieldName1 |
This returns not only the field name but also the start and length of the index segment, with comma separators eg "AccountCode,2,10" - note that if the user has left start and length empty (the default), it will return (eg) "AccountCode,0,0" |
FieldName2 |
Second field of Index |
FieldName3 |
Third field of Index |
FieldName4 |
Fourth field of Index |
Library
Name |
Procedure library name |
Procedure
There are no prperties implemented for Procedures. |
Example | This example will return the Data Type for a field called UsrConLogin, the number of fields in the table UsrCon and the Table that index UsrInDateTimegx belongs to
string vsProperty
LoadCatalogs
CatalogProperty 2, "UsrConLogin", "DataTypeName", vsProperty
Print vsProperty
CatalogProperty 1, "UsrCon", "NumberOfFields", vsProperty
Print vsProperty
CatalogProperty 3, "UsrInDateTimegx", "TableName", vsProperty
Print vsProperty
|