SyncImportFromFiles
Structure
SyncImportFromFiles(sSyncMapName, sToDirectory, sCompanyMap, sSQLUpdateAfterImport, dtDateTime, bLab, bDeleteLocalAfterImport)
Parameters
| Parameter | Type | Description
| sSyncMapName | String | Name of the Sync Map to be used - this should be an export-related sync mapsToDirectory | String | Network directory that contains the sync zips for importsCompanyMap | String | Company Map to be applied, use format of Company=MappedCompany with multiple items delimited by semicolons.sSQLUpdateAfterImport | String | SQL that should be applied to each equipment record after import. SQL should be in a format like example below (begins with 'UPDATE GAGES SET' and omits 'WHERE' - which will be auto-added depending upon asset being imported):
UPDATE GAGES SET MYFIELD='MY VAL'dtDateTime | Date/Time | Date/Time filter for potentially excluding files in the network directory from download/importbLab | Boolean | True if 'Action Performed By' is 'Lab/Central'. False if 'Action Performed By' is 'Customer/RemotebDeleteLocalAfterImport | Boolean | If True then local file is deleted after import |
Return Value
String
Description
This function is related to Sync Maps as setup within IndySoft DataSync - Options. This function imports one/more import files from a network directory based upon a sync map, exceptions to various criteria allowed.
Example
sSyncMapName = "TEST1"
sToDirectory = "C:\Temp\Downloaded\100009"
sCompanyMap = "ABC COMPANY=12345;CDE COMPANY=545A781"
sSQLUpdateAfterImport = "UPDATE GAGES SET STATUS3 = '0'"
dtDateTime = (Now - 20)
bLab = False
bDeleteLocalAfterImport = False
sResult = SyncImportFromFiles(sSyncMapName, sToDirectory, sCompanyMap, sSQLUpdateAfterImport, dtDateTime, bLab, bDeleteLocalAfterImport)
DebugLog(sResult)
SendEMail("notreal@notgmail.com", "", "", "SyncImportFromFiles Results", "", "SYNCMAP", sResult, False, False)
Application Compatibility
IndySoft Calibration Management, IndySoft Commercial Lab Management, IndySoft Tool Management |