- Defining the items programmatically
- Limitation
Type (Property) In french: Type
The Type property is used to get: - the type of element (data file or item) defined programmatically or in the data model editor, view or query.
- the type of object.
- the type of data held in a Variant.
Remark: To change the type of data held in a Variant, use VariantConvert.
The Type property defines the type of a dynamic object.
MyVariant is Variant = "5" Info(MyVariant..Type) // Return 19
// Find out the type of "Contact" item ResType = Customer.Contact.Type // Find out the type of the Customer data file ResType = Customer.Type
Syntax
Getting the type of data held in a Variant Hide the details
<Result> = <Variable used>..Type
<Result>: Integer Type of data held in the Variant variable: | | | wlBoolean | 1 | Boolean | wlCharacter | 81 | Character | wlString | - 16 in an ANSI configuration
- 19 in a Unicode configuration.
| Character string | wlCombination | 136 | Combination | wlDate | 24 | Date | wlDateTime | 26 | DateTime | wlDuration | 27 | Duration | wlInt | 8 | Signed 4-byte integer | wlEnumeration | 135 | Enumeration | wlTime | 25 | Time | wlCurrency | 10 | Currency | wlSecurePassword | 160 | Secure password | wlNumeric | 13 | Numeric | wlPoint | 150 | Point | wlProcedure | 61 | Procedure | wlRectangle | 151 | Rectangle | wlReal | 12 | 8-byte real | wlSQLQuery | 152 | SQL query | wlAdvancedType | 111 | Advanced variable type | wlUUID | 154 | UUID | wlUUID_128 | 154 | UUID | wlUUID_256 | 155 | UUID | wlVariantObject | 143 | The Variant contains named subelements. | wlVariantArray | 142 | The Variant contains indexed subelements. | wlEmpty | 0 | The Variant is empty. |
<Variable used>: Variable name Name of the Variant variable to be used.
Getting the type of a data file or item Hide the details
<Result> = <Object used>.Type
<Result>: Integer constant - If the name of a data file, view or query is specified: Type of the specified file:
| | | hFileAS400 | 54 | AS400 file | hFileOther | 58 | Other type of file | hFileClientServer | 79 | HFSQL Client/Server file | hFileHF5 | 56 | Hyper File 5 file | hFileMySQL | 72 | MySQL file | hFileNormal | 51 | Standard file (HFSQL Classic) | hFileOLEDB | 60 | OLE DB file | hFileOracle | 61 | Oracle file | hFileOracleLite | 83 | Oracle Lite file | hFilePostgreSQL | 88 | PostgreSQL file | hFileProgress | 77 | Progress file | hFileQuery | 57 | Query | hFileQueryAS400 | 67 | Query on an AS/400 database | hFileQueryClientServer | 80 | Query on an HFSQL Client/Server database | hFileQueryMySQL | 69 | Query on a MySQL database | hFileQueryOLEDB | 64 | Query on a database accessed via an OLE DB provider | hFileQueryOracle | 65 | Query on an Oracle database | hFileQueryOracleLite | 85 | Query on an Oracle Lite database | hFileQueryPostgreSQL | 87 | Query on a PostgreSQL database | hFileQueryProgress | 78 | Query on a Progress database | hFileQuerySQLAzure | 66 | Query on an SQL Azure database | hFileQuerySQLServer | 66 | Query on an SQL Server database | hFileQuerySybase | 76 | Query on a Sybase database | hFileQueryXML | 82 | Query on an XML database | hFileSQL | 50 | SQL file | hFileSQLAzure | 91 | SQL Azure file | hFileSQLite | 89 | SQLite file | hFileSQLServer | 62 | SQL Server file | hFileSybase | 75 | Sybase file | hFileTemporary | 52 | Temporary file | hFileView | 55 | View | hFileXBase | 53 | xBase file | hFileXML | 81 | XML file |
- If the name of an item is specified: Type of the specified item:
| | | hItemBinary | 23 | Binary | hItemBoolean | 27 | Boolean | hItemCharacter | 26 | Character | hItemCombination | 33 | Combination | hItemDate6 | 10 | Date in YYMMDD format | hItemDate8 | 14 | Date in YYYYMMDD format | hItemDateTime | 24 | Date/Time | hItemTimeLength | 25 | Duration | hItemInteger1 | 4 | 1-byte integer | hItemInteger2 | 3 | 2-byte integer | hItemInteger4 | 5 | 4-byte integer | hItemInteger8 | 19 | 8-byte integer | hItemUnsignedInteger1 | 12 | Unsigned 1-byte integer | hItemUnsignedInteger2 | 9 | Unsigned 2-byte integer | hItemUnsignedInteger4 | 22 | Unsigned 4-byte integer | hItemUnsignedInteger8 | 20 | Unsigned 8-byte integer | hItemEnumeration | 32 | Enumeration | hItemHour | 11 | Time | hItemIDAuto | 1 | Automatic identifier (8 bytes) | hItemIDAuto4 | 28 | Automatic identifier (4 bytes) | hItemPicture | 21 | Image | hItemInvalid | 0 | Invalid | hItemJSON | 38 | JSON | hItemBinaryMemo | 18 | Binary memo | hItemBinaryMemo4 | 16 | Binary memo (4 bytes) | hItemTextMemo | 15 | Text memo | hItemUnicodeMemo | 30 | Unicode text memo | hItemCurrency | 17 | Currency | hItemSecurePassword | 39 | Password | hItemNumRec | 8 | Record number | hItemNumeric | 31 | Numeric | hItemReal4 | 6 | 4-byte real | hItemReal8 | 7 | 8-byte real | hItemRealTurbo | 13 | Turbo real | hItemText | 2 | Text | hItemUnicodeText | 29 | Unicode text | hItemUUID128 | 34 | UUID 128 | hItemUUID128Auto | 35 | UUID 128 automatic identifier | hItemUUID256 | 36 | UUID 256 | hItemUUID256Auto | 37 | UUID 256 automatic identifier |
<Object used>: Type of object Name of the object to be used:- data file defined in the data model editor or programmatically,
- view,
- query,
- item defined in the data model editor or programmatically.
Getting the type of a control (in a window or page), table cell, group of controls, window or page Hide the details
<Result> = <Object used>.Type
<Result>: Constant Type of the specified object. <Object used>: Type of object Name of the object (window control, page control, table cell, group of controls, page or window) to be used. Remarks Limitation For controls in a window or page, the Type property cannot be used on: - an option in a Check Box or Radio Button control,
- a row in a Table or Combo Box control,
- a row in a List Box control,
This page is also available for…
|
|
|
|