Skip to main content

SyncImport

Structure

SyncImport(sSyncMapName, sFileName, sCompanyMap, sSQLUpdateAfterImport, bLab)

Parameters

ParameterTypeDescription
sSyncMapNameStringName of the Sync Map to be used - this should be an import-related sync map
sFileNameStringFile to be imported
sCompanyMapStringCompany Map to be applied, use format of Company=MappedCompany with multiple items delimited by semicolons.
sSQLUpdateAfterImportStringSQL 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'
bLabBooleanTrue if 'Action Performed By' is 'Lab/Central'. False if 'Action Performed By' is 'Customer/Remote

Return value

String

Description

This function is related to Sync Maps as setup within IndySoft DataSync - Options. This function imports a single file based on a sync map.

Example

sFileName = "C:\Temp\100003-TEST1-03-02-2015 13-43-02.ZIP"
sCompanyMap = ""
sSQLUpdateAfterImport = ""
bLab = True
sResult = SyncImport("SYNCIMPORT TEST", sFileName, sCompanyMap, sSQLUpdateAfterImport, bLab)
DebugLog(sResult)
SendEMail("notreal@notgmail.com", "", "", "SyncImport Results", "", "SYNCMAP", sResult, False, False)