Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SQL Anywhere 10.0.1 » SQL Anywhere 10 - Context-Sensitive Help » MobiLink Plug-in Model Mode Help » MobiLink Model mode wizards

Create Synchronization Model wizard: Download Subset page Next Page

Create Synchronization Model wizard: Download Subset by Synchronization User page

This page allows you to specify the information required to subset data by MobiLink user name. To use this option the MobiLink user names must be on your consolidated database. You choose your MobiLink user names when you deploy, so you can choose names that match existing values on your consolidated database. If the MobiLink user names are in a different table from the one you are subsetting, you must join to that table. For example, you can join columns containing first names and last names.

This page has the following components:

Use a column in each downloaded table    For downloaded tables that include the specified column, each row is downloaded by only one MobiLink user. For tables that are also uploaded, you must either synchronize the column or define a default value for it.

Use a column in a joined relationship table    If the MobiLink user names are in a different table from the one you are subsetting, you must join to that table. For an example of when to use this option, see the example below. Specify the following information for the join:


The ULOrder table in CustDB can be shared between users. By default, orders are assigned to the employee who created them. But there are times when another employee needs to see orders created by someone else. For example, a manager may need to see all the orders created by employees in their department. The CustDB database has a provision for this via the ULEmpCust table. It allows you to assign customers to employees. They download all orders for that employee customer relationship.

To configure synchronization for this scenario select the Use a Column in a Joined Relationship Table option and set the following options on this wizard page:

Table to JoinULEmpCust
Column to Matchemp_id
T dropdown list (for the ULOrder table)emp_id (integer)
DBA.ULEmpCust table emp_id (integer)

The following download_cursor script is generated based on these settings:

SELECT "DBA"."ULOrder"."order_id",
FROM "DBA"."ULOrder", "DBA"."ULEmpCust"
WHERE "DBA"."ULOrder"."last_modified" >= {ml s.last_table_download} 
AND "DBA"."ULOrder"."emp_id" = "DBA"."ULEmpCust"."emp_id" 
AND "DBA"."ULEmpCust"."emp_id" = {ml s.username}

This example uses timestamp-based download.

You can view and modify this script, after the Create Synchronization wizard finishes, in the Model mode Events tab. See Modifying scripts in a model.

See also