SyncTrend

Synchronizes the trend database.

Function Group Execution Windows Embedded Thin Client Mobile Access
SyncTrend Database/ERP Asynchronous Supported Supported Executed on Server Executed on Server

Syntax

  SyncTrend( numGroup, optStrStartDate, optStrEndDate )  
numGroup
Trend group/worksheet number.
optStrStartDate
String with the start date. If this parameter is not specified, then the current date is used.
optStrEndDate
String with the end date. If this parameter is not specified, then the function uses the same as the start date.

Returned value

Value Description
1 Fail to start synchronization; the database is probably being synchronized.
0 Success
-1 Invalid group number
-2 The format is not set to “Database”.
-4 Start date specified is invalid.
-5 End date specified is invalid.
-6 Start date is greater than the end date.

Notes

This function is executed asynchronously, so it doesn’t return the result of the synchronization. To get that information, use the SyncTrendStatus function.

Examples

Tag Name Expression
Tag SyncTrend(1) // Synchronizes the group 1 database using the current date
Tag SyncTrend(1, “10/20/2004″) // Synchronizes the group 1 database only for the day 10/20/2004
Tag SyncTrend(1, “10/20/2004″, “10/28/2004″) // Synchronizes the group 1 database from 10/20/2004 to 10/28/2004

SyncTrend