Develop > Tailoring > Links > Virtual joins > Example: Creating a virtual join

Example: Creating a virtual join

Applies to User Roles:

System Administrator

The tasks listed below illustrate the steps involved in retrieving data from a file called sales and displaying data in a form called orders.

The forms and subforms that you need to build to create a virtual join include:

  • sales: You create the main sales form, and then you create a database dictionary file so data can be entered through the form and recorded to the database. The file in the database associated with this form is the target file from which data will be retrieved to display in the orders file.
  • sales1 subform: When you create the sales1 subform, it is a copied and modified version of the original form (sales). It is already associated with the sales database dictionary record.
  • orders: When you create the orders form, you will add fields for customer name, contact, phone number, and order amount.

Note: Code must be a single Unique key (not concatenated) in the target file. Also, the source and target fields must be scalar (non-array).

To complete building the necessary forms and creating the virtual join in order to retrieve data from the sales file and display data in the order forms, perform the following tasks:

  1. Build the sales form
  2. Create the sales file
  3. Create the sales record list
  4. Add data to the sales file
  5. Create the sales1 subform
  6. Create the orders form
  7. Build the virtual join into the form
  8. Build the link
  9. Verify that the sales1 form works

Related concepts

Virtual joins
Understanding subforms

Related tasks

Build the sales form
Create the sales file
Create the sales record list
Add data to the sales file
Create the sales1 subform
Create the orders form
Build the virtual join into the form
Build the link
Use the virtual join
Verify that the sales1 form works