IsAppChangedOnServer

The function IsAppChangedOnServer checks whether the project files available on the server are newer than the files currently on the client.

Function Group Execution Windows Embedded Thin Client Mobile Access
IsAppChangedOnServer System Info Synchronous Supported Supported Supported Not supported

Syntax

  IsAppChangedOnServer("optTagUpdateTrigger")  
Web Studio Help eminfo isappchangedonserver.xml d226320e103 IsAppChangedOnServer

optTagUpdateTrigger
The name of a project tag that will server as a trigger. When the value of the specified tag changes, the function is executed. Unlike most other functions, once this function is called, it is kept in memory until the project is stopped.

To execute the function at regular intervals, use one of the system tags like Day or Month.

This parameter is optional; if no value is specified, the function is executed immediately and not kept in memory.

Note: The tag name should be enclosed in quotes, as shown in the syntax diagram, or else the function will try to use the value of the tag.

Returned value

This function returns the following possible values:
Value Description
0 FALSE (i.e., the project files on the server have not changed)
1 TRUE (i.e., the project files on the server have changed)

If this function returns TRUE, you can use the function ReloadAppFromServer to update the client.

Notes

For this function, the server is the computer or device that hosts the downloadable project files (e.g., screens) for your thin clients. It might be different from the project runtime server (a.k.a. the data server), depending on how you deploy your project. For more information, see Configuring a Web Solution.

If the option Enforce Web functionality equivalence is selected in the project settings, this function cannot be called from Global Procedures or Script worksheets. This is because the function is meaningful only when it is executed on stations that display project screens; it might cause unexpected behavior if it is called from background tasks that are executed on the project runtime server. For more information, see Preferences tab.

Examples

Immediately check whether the project files have changed:
  IsAppChangedOnServer()  
When the value of the tag CheckVersion changes, check whether the project files have changed:
  IsAppChangedOnServer("CheckVersion")  

IsAppChangedOnServer