Zum Hauptinhalt springen

SyncExportToFiles

Structure

SyncExportToFiles(sSyncMapName, sEquipFilter, sDirectory, bLab)

Parameters

| Parameter | Type | Description
| sSyncMapName | String | Name of the Sync Map to be used - this should be an export-related sync mapsEquipFilter | String | SQL for the filter of assets that should be exported. SQL should be in the format as in example below (begins with 'FROM GAGES WHERE '):

FROM GAGES WHERE COMPANY = 'ABC COMPANY'sDirectory | String | Network directory where the sync zip files should be exportedbLab | Boolean | True 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 exports a group of assets to a network directory based upon a sync map, exceptions to various criteria allowed.

Example

sCompany = "100003"

if tdDoSQLRecords(1, "SELECT VARIABLE_DATE FROM COMPANY_VARS WHERE COMPANY = '" & sCompany & "' AND VARIABLE_NAME = 'LAST EXPORT DATE'") then

dtCompanyLastExport = tdFieldByNameAsDateTime(1, "VARIABLE_DATE")

Else

dtCompanyLastExport = 0

RunSQL("INSERT INTO COMPANY_VARS (COMPANY, VARIABLE_NAME) VALUES ('" & sCompany & "', 'LAST EXPORT DATE')")

End If

sSyncMapName = "TEST1"

sEquipFilter = "FROM GAGES WHERE COMPANY = '" & sCompany & "' AND LAST_MODIFIED_DATE >= '" & FormatDateTimeForSQL(dtCompanyLastExport) & "'"

sDirectory = "C:\Temp\Uploaded" & sCompany

bLab = True

sResult = SyncExportToFiles(sSyncMapName, sEquipFilter, sDirectory, bLab)

DebugLog(sResult)

SendEMail("notreal@notgmail.com", "", "", "SyncExportToFiles Results", "", "SYNCMAP", sResult, False, False)

Application Compatibility

IndySoft Calibration Management, IndySoft Commercial Lab Management, IndySoft Tool Management |