Data Exchange Examples

The following examples include a data exchange template and a data exchange entity created from that template.

See Also

Data Exchanges

Template Creation Example

Although Xephr Repositories are initialized with a template for each entity type, we are going to create a new template in order to familiarize you with the process.  

  1. Right click on the Template Information object.

  2. Select Create > Template from the menu.

  3. The Creating an Entity screen is displayed.

  4. Click on the Data Exchange bullet.

  5. Click on the Next button at the bottom of the screen.

  6. In the Entity Name field, enter DATA_TEMPLATE.

  7. Leave the Datasource pop-list set to (use default), which will default any entities created from this template to the repositories default datasource.

  8. Leave the Based On pop-list set to (NONE), as we are not basing this template off of any other template.

  9. Leave the Default Mode pop-list set to Run Report.

  10. In the Body Style pop-list, select DEFAULT_STYLE as the default body style.

  11. In the Editable Field Style pop-list, select DEFAULT_DATA_ENTRY as the default style for any fields that allow entry, such as fields on parameter forms.

  12. In the Non-Editable Field Style pop-list, select DEFAULT_STYLE for non-editable fields, such as labels.

  13. In the Lov Style pop-list, select DEFAULT_STYLE as the default style for list of values associated with this entity.

  14. In the Link Style pop-list, select LINKS as the default style for hyperlinks on this entity.

  15. Click on the Finish button at the bottom of the screen.

  16. The template is created and displayed in green in the Explorer Tree.

  17. Click on the Save button in the main toolbar to save the new template.

  18. Click on the DATA_TEMPLATE entity.  Verify that these settings are acceptable.  For more information on these settings, see either the Property Definitions section or the Data Exchange Templates section.

  19. Click on the Save button in the main toolbar to save the changes.

Entity Creation Example

Now we will create a data exchange entity that will export country codes using the template we just created.

  1. Select the Group Information object.  Expand it, and select the group to which you wish to add the new data exchange entity.

  2. Right click on the group and select New->Wizard->Entity.

  3. Click on the Data Exchange bullet.

  4. Click on the Next button at the bottom right of the screen.

  5. In the Entity Name property, type COUNTRY_CSV as the entity name.

  6. Leave the Datasource property set to (use default), since there is only one datasource for the Xephr install.

  7. In the Based On property, select DATA_TEMPLATE, which is the template that we created earlier.

  8. Leave the Default Mode set to Run Report.

  9. Leave the Body Style property set to (from parent) to indicate that the style should be obtained from this entity's template.

  10. Leave the Editable Field Style property set to (from parent) to indicate that the style should be obtained from this entity's template.

  11. Leave the Non Editable Field Style property set to (from parent) to indicate that the style should be obtained from this entity's template.

  12. Leave the Lov Style property set to (from parent) to indicate that the style should be obtained from this entity's template.

  13. Leave the Link Style property set to (from parent) to indicate that the style should be obtained from this entity's template.

  14. Click on the Next button at the bottom right of the screen.

  15. In the Block Name property, enter COUNTRY_CODES as the name of the block.

  16. In the Block Type property, select Standard Block.

  17. Set the Query Type property to Simple Query.

  18. Leave the Datasource property set to (use default), since there is only one datasource for the Xephr install.

  19. In the Table property, select the name of the table or view from which you are exporting the data.  Since our datasource is set to use the Oracle 9i database for NDS Applications, we will select the view COUNTRY_UVW.

  20. Leave the Create Heading flag set to off.

  21. In the Scheme Selection section, set the List bullet to on.  

    This block will display multiple records, and the labels need to be displayed in a row at the top, while each record needs to be displayed in a row beneath that.  The list scheme will lay out the records in this fashion.

  22. Click on the Next button at the bottom right of the screen.

  23. The Adding Fields screen is displayed.  Select the columns that you wish to include in the export.

  24. Click on the name of the column to select both the Field and Label checkboxes for that column.  Do this for the following columns:

COUNTRY_ID

COUNTRY_ID2

COUNTRY_NAME

CURRENCY_CD

CURRENCY_NAME

  1. A key must be selected to continue.  Set the Key checkbox to on for the COUNTRY_ID field, as it is the key for this table.

  2. In the Filters property, you could enter code to restrict the data returned from the table.  We want all country codes, so we will leave this property blank.

  3. In the Ordering and Grouping property, you can enter code to determine the order in which the data is displayed in the data exchange file.  We want the country codes in alphabetical order by code, so enter the following in this property:

order by country_id

  1. Click on the Next button at the bottom of the screen to continue.

  2. The Ordering Fields screen is displayed next.  The columns are initially ordered as they were listed on the previous screen.  

    To move a field up or down, highlight the desired field by selecting it, and click on the Move Up or Move Down buttons on the right of the screen.  

  3. Click on the Next button when you have finished moving the fields.

  4. The Option to Add More screen is displayed.  We have no more blocks to add, so click on the Finish button.

  5. The new entity is added to the initially selected group.  Click on the Save button in the main toolbar to save the new data exchange entity.

  6. To test the new data exchange entity, highlight it by selecting it, and click on the Run button in the main toolbar.

  7. The Preparing to Run Data Exchange screen will be displayed, click on the Run button on the bottom left.

  8. The file will be opened in the browser, displaying entity's block.

Xephr is a registered trademark of NDS Systems, LC.

Copyright © 2007 NDS Systems LC.