The following section gives a description of all exposed properties on the XML class.
There is no syntax checking when strings are assigned to the XML properties. The validation of the XML format is done during import.
The following table contains the properties used for handling the XML strings.
(Click on the property name to examine the associated data structure.)
Name | Type | Comment |
XMLSettings | String | Property for settings |
XMLDepartmentList | String | Property for departments |
XMLGroupList | String | Property for groups |
XMLDictionaryList | String | Property for dictionary definitions |
XMLChecklistList | String | Property for checklist definitions |
XMLCategoryList | String | Property for categories |
XMLSalaryCodeList | String | Property for salary codes |
XMLEmployeeList | String | Property for employees |
XMLCustomerList | String | Property for customers |
XMLItemNumberTypeList | String | Property for item number types with grouping structure |
XMLWholesalerList | String | Property for wholesalers and price list |
XMLStoreList | String | Property for stores (Import and Export) |
XMLStoreMovementList | String | Property for store movements (Import and Export) |
XMLPackageList | String | Property for item packages |
XMLPurchaseOrderList | String | Property for purchase orders (Import and Export) |
XMLOrderList | String | Property for orders (Import and Export) |
XMLMessageList | String |
Property for Warnings and error messages for last import/export |
XMLClientList | String |
This property is populated when the object is instanciated. It will contain a list of all ClientID's and corresponding names known to the Handyman installation. This list is useful for looping trough all clients in an multiclient installation. |
ClientList | String |
Contains the same info as in XMLClientList except Name of client. This proerty lists all ClientID's in TAB-sparated format. |
XMLEventList | String | Property for events from mobile device when using TMS (start day, start work etc) |
The following table contains other properties on the component.
Name | Type | Comment |
ExportStatus | Long | Read only. -1 : Not able to connect to the database 0 : OK > 0 error number reported from VisualBasic |
ImportStatus | Long | Read only. -1 : Not able to connect to the database 0 : OK > 0 error, see further description below |
ErrorMessage | String | Read only. Contains last error message. |
ErrorNumber | Long | Read only. Contains last error number. |
[ConnectionString] | String |
Optional. The object locates the handyman5.ini to connect to the database. |
ExportInCompleteMessage | String | Property to set errormessage when import in backoffice system fails. The message will be written to the Handyman log |
ClientID | String | Must be set in MultiClient environment |
ImportStatus property
During an import all properties containing XML strings will be imported. If an error occurs, an error number is added to the error property ImportStatus with the OR operator. For instance if an error occur in string 3 and 6, ImportStatus will contain the number 36, represented in binary this would be 0100100.
The sequence the strings are imported in are as follows:
Sequence | To be imported | Error | Property |
1 | Settings | 256 | XMLSettings |
2 | Stores | 16 | XMLStoreList |
3 | Departments | 512 | XMLDepartmentList |
4 | Groups | 1024 | XMLGroupList |
5 | Dictionaries | 2048 | XMLDictionaryList |
6 | Checklists | 4096 | XMLChecklistList |
7 | Categories | 8192 | XMLCategoryList |
8 | Salary codes | 1 | XMLSalaryCodeList |
9 | Employees | 2 | XMLEmployeeList |
10 | Customers | 4 | XMLCustomerList |
11 | Item number types with grouping structure | 32768 | XMLItemNumberTypeList |
12 | Wholesalers and Pricelist | 8 | XMLWholesalerList |
13 | Store movements | 32 | XMLStoreMovementList |
14 | Item packages | 128 | XMLPackageList |
15 | Purchase orders | 16384 | XMLPurchaseOrderList |
16 | Orders | 64 | XMLOrderList |
To simplify the error handling, all XML strings that are successfully imported are cleared. So, in the case just described, all properties except XMLCustomerList AND XMLStoreMovementList would bee cleared.
A sufficient check for errors per string is:
If XMLStoreMovementList = “” then …
OK ...
Else
NotOK ...
End if
Comment:
The ErrorNumber and ErrorMessage properties will contain only the latest error message. If there are errors on more than one of the XML strings, only the last error will be stored.