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

SQL Anywhere 11.0.0 » Context-Sensitive Help » MobiLink Plug-in Model mode help » MobiLink Model mode wizards


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. (The column you use for MobiLink user names must be of a type that can hold the values you are using for the user name.) 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.

  • Column name   Choose a column name from the dropdown list. The dropdown list contains all the columns from the synchronized consolidated tables.

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:

  • Table to join   Choose a table from the dropdown list. This table is joined to each synchronized table that has the column specified below.

  • Column to match   Choose a column from the dropdown list.

  • Choose the columns for joining each downloaded table T with the relationship table in the following join condition   Choose a column from each dropdown list to specify how the tables are to be joined.


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:

Option Value
Table to Join ULEmpCust
Column to Match emp_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 the download subset.

See also