Skip to Content

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’.

/wp-content/uploads/2014/04/step4_432681.png

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.

/wp-content/uploads/2014/04/step8_432725.png

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.

/wp-content/uploads/2014/04/step_432728.png

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

/wp-content/uploads/2014/04/com_432729.png

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:                                          

/wp-content/uploads/2014/04/d1_432958.png

Sync Query:

/wp-content/uploads/2014/04/d2_432959.png

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

Data Query


/wp-content/uploads/2014/04/d3_432960.png

Sync Query

/wp-content/uploads/2014/04/d4_432961.png

Step II

1. Define an add transaction for complex object.

/wp-content/uploads/2014/04/d5_432834.png

2.Set the Key Property as Product ID.

/wp-content/uploads/2014/04/d6_432842.png

Step III:

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

/wp-content/uploads/2014/04/d7_432844.png


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’.

/wp-content/uploads/2014/04/d8_432849.png

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


2.select 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/d10_432854.png


/wp-content/uploads/2014/04/d11_432855.png3.select 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 fields.select 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.

/wp-content/uploads/2014/04/d13_432858.png
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.

/wp-content/uploads/2014/04/d14_432944.png

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.

/wp-content/uploads/2014/04/d16_432951.png

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.

/wp-content/uploads/2014/04/d17_432956.png







To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply