Skip to Content
Author's profile photo Sravanthi Polu

Complex Table Change And Complex Table Add Transactions

Hope this document may be helpful……

This document describes a simple example to update an existing record in complex table through ‘Complex Table Change Transaction’ and also how to add a record to the complex table through ‘Add Transaction’.

Complex Table Edit Transaction:

Step I:

Define an object definition named Complex.Add the properties to the defined Complex object and specify the key property as Product ID.

Step 1.png

Step II:

1. Add the transaction named ‘Complex Table Change’ to the Complex Object.

Step 2.png

2. Specify the key property as Product ID for the transaction.

Step 2.1.png

Step III:

1. Define an SQL Step named ‘Update Complex Table’ ,write the code to update the fields based on the Product ID.

Step 3.png

2. Map the defined Update Step to Server Update Steps of the defined complex table transaction with ‘Response To Client ‘ attribute set as ‘Replace Client Object’.


Step IV:

1. Design a screen set for complex table transaction.Define a transaction screen containing following properties.

step 5.1.png

2. Make the Product ID field edit type as ‘Complex table Search’ and save.Specify the Complex table Products .

Step 5.2.png

3. Select the Product Name field in the transaction screen and specify the update rule as follows by selecting browse.

:>Current Screen Set>Current Detail Screen>”ProductID” Field>Current Record>”ProductName” Field

step 5.3.png

4.Make the Product Name filed as read only.

step 5.6.png

5.Follow the steps 3 and 4 for all the remaining fields except ‘Unit Price’ since we are allowing the user only to update unit price field based on the selected Product ID. The remaining fields are displayed on the screen in read only mode based on the Product ID selected by the user.

Step V:

Define an action named ‘Update Complex Table’ with step type as ‘Transaction’. Define an Apply step to save the transaction.

step 6.png step 6.1.pngStep VI:

Define an Action button in any one of the screen.Publish the definitions to the agentry server.

Step: VII:

1. Test the application in ATE.


2.Now try to update any one of the record in complex table.Select a Product ID from complex table search and update unit price as shown.Note that the remaining field values are displayed based on the Product ID selected.

ste 9.png

3.Perform transmit or synchronization, the complex table record will be updated to back end and also retrieved on to the agentry client.


4.Finally check whether the record has been updated to the complex table on the agentry client and also back end.


Complex Table Add Transaction:

Step I:

Define two data tables Categories and Suppliers.Since my database contains relation ship between Products,Categories,Suppliers.Here iam allowing the user to select Category Name based on the data table key Category ID previously selected, similarly Company Name based on the key value Supplier ID previously selected.This kind of constraint restricts the user to select only those records provided in the drop down as a result the relation ship between the tables is maintained correctly while allowing the user to update following the conditions.

1.Define categories data table and write the sync query and data query as shown below

Data Query:                                          


Sync Query:


2.Define Suppliers data table and write the sync query and data query as shown.

Data Query


Sync Query


Step II

1. Define an add transaction for complex object.


2.Set the Key Property as Product ID.


Step III:

1. Define an update step ‘Insert Complex Product’.


2.Map the ‘Insert Complex Product’ step to the Server Update Steps of the transaction ‘Add Complex’ with response set to ‘Update Client Key Property’.


Step IV:

1.Design a screen set for ‘Add complex’ transaction.Select the desired platform , add the transaction screen with following properties

/wp-content/uploads/2014/04/d9_432850.png the Category ID field and change the edit type to data table selection, and specify the data table Category defined previously.


/wp-content/uploads/2014/04/ the Category Name property and define the following update rule to automatically get the category name based on the category ID selected from the drop down .

/wp-content/uploads/2014/04/d12_432856.png4. Follow steps 2 and 3 for supplier ID  and Company Name the data table suppliers for Supplier ID and write an update rule for Company Name.

Step V:

1. Define an action with action step type as ‘Transaction’ ,apply step to save the transaction locally.

2.Define an action button that targets the above defined transaction action in any of the screen and publish the application.

Step VI:

1.Test the application in ATE.Check the number of records in complex table.Note that the complex table contains 72 records.


2.Add the records to the complex table from ATE as follows.Note that the Category Name is read only and is displayed based on the Category ID selected by the user in Category ID field.Similarly Company Name based on Supplier ID/wp-content/uploads/2014/04/d15_432950.png

3.Perform Synchronization.Note the messages in ATE related to complex table updation.


4.Check that the record is updated to the back end and also to the complex table in ATE.Note the number of records and also the Product ID record 86 added by the transaction.


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.