Use the following step procedure to create a simple FactBox to display the
customer's pets. A FactBox uses a Query, which is similar to a View. It is used to
select data from one or more tables.
1. In the AOT, right-click the Queries node and select New Query.
Rename the new query to VetCustPetInfoPart.
2. In a second AOT, locate the VetCustPetTable table.
3. Drag the VetCustPetTable table to the DataSources node on the
VetCustPetInfoPart query.
4. Expand the VetCustPetTable_1 data source.
5. In the property sheet for the fields node set the Dynamic property to
Yes. This means all fields in the table will be included in the query.
6. In a second AOT, locate the VetBreedTable table.
7. Drag the VetBreedTable to the DataSources node on the
VetCustPetTable_1 datasource.
8. In the property sheet for the VetBreedTable_1 datasource, set the
Relations property to Yes.
9. In the property sheet for the fields node on the VetBreedTable_1
datasource, set the Dynamic property to Yes.
10. Save your changes to the VetCustPetInfoPart query.
11. Expand the Parts node in the AOT.
12. Right-click the Info Parts node and select New Info Part.
13. In the property sheet for the new info part, set the Name property to
VetCustPetTableInfoPart, set the Caption property to Pets, set the
Query property to VetCustPetInfoPart.
14. Right-click the Layout node in the info part, and select New Group.
15. In the property sheet for the group, set the Repeating property to
Yes.
16. Right-click the new group and select New Field.
17. In the property sheet for the new field, set the DataSource property
to VetCustPetTable_1, and the DataField property to Name.
18. Right-click the group and select New Field to create a second field.
19. In the property sheet for the second field, set the DataSource.
property to VetBreedTable_1 and the DataField property to Name
20. Save your changes to the VetCustPetTableInfoPart info part.
Procedure: Adding a FactBox to a List Page
Use the following step procedure to add the FactBox to the customer's list page.
1. Create a new menu item for the info part, by dragging the
VetCustPetTableInfoPart to the Menu Items > Display node in
the AOT.
2. Locate the VetCustPetTable table in the AOT.
3. Expand VetCustPetTable table.
4. Right-click the Indexes node and select New Index
5. Rename the index to CustIdx
6. From the fields node on the table, drag the CustAccount field to the
CustIdx index.
7. Save your changes to the table.
8. Locate the CustTableListPage form in the AOT.
9. Drag the VetCustPetTableInfoPart menu item to the Parts node.
10. In the property sheet for the new part reference, set the
DataSourceRelation property to
EDT.VetCustPetTable.CustAccount.
11. Save your changes to the CustTableListPage form.
12. Open the customer's list page and notice the new info part in the
FactBox section of the form.
customer's pets. A FactBox uses a Query, which is similar to a View. It is used to
select data from one or more tables.
1. In the AOT, right-click the Queries node and select New Query.
Rename the new query to VetCustPetInfoPart.
2. In a second AOT, locate the VetCustPetTable table.
3. Drag the VetCustPetTable table to the DataSources node on the
VetCustPetInfoPart query.
4. Expand the VetCustPetTable_1 data source.
5. In the property sheet for the fields node set the Dynamic property to
Yes. This means all fields in the table will be included in the query.
6. In a second AOT, locate the VetBreedTable table.
7. Drag the VetBreedTable to the DataSources node on the
VetCustPetTable_1 datasource.
8. In the property sheet for the VetBreedTable_1 datasource, set the
Relations property to Yes.
9. In the property sheet for the fields node on the VetBreedTable_1
datasource, set the Dynamic property to Yes.
10. Save your changes to the VetCustPetInfoPart query.
11. Expand the Parts node in the AOT.
12. Right-click the Info Parts node and select New Info Part.
13. In the property sheet for the new info part, set the Name property to
VetCustPetTableInfoPart, set the Caption property to Pets, set the
Query property to VetCustPetInfoPart.
14. Right-click the Layout node in the info part, and select New Group.
15. In the property sheet for the group, set the Repeating property to
Yes.
16. Right-click the new group and select New Field.
17. In the property sheet for the new field, set the DataSource property
to VetCustPetTable_1, and the DataField property to Name.
18. Right-click the group and select New Field to create a second field.
19. In the property sheet for the second field, set the DataSource.
property to VetBreedTable_1 and the DataField property to Name
20. Save your changes to the VetCustPetTableInfoPart info part.
Procedure: Adding a FactBox to a List Page
Use the following step procedure to add the FactBox to the customer's list page.
1. Create a new menu item for the info part, by dragging the
VetCustPetTableInfoPart to the Menu Items > Display node in
the AOT.
2. Locate the VetCustPetTable table in the AOT.
3. Expand VetCustPetTable table.
4. Right-click the Indexes node and select New Index
5. Rename the index to CustIdx
6. From the fields node on the table, drag the CustAccount field to the
CustIdx index.
7. Save your changes to the table.
8. Locate the CustTableListPage form in the AOT.
9. Drag the VetCustPetTableInfoPart menu item to the Parts node.
10. In the property sheet for the new part reference, set the
DataSourceRelation property to
EDT.VetCustPetTable.CustAccount.
11. Save your changes to the CustTableListPage form.
12. Open the customer's list page and notice the new info part in the
FactBox section of the form.
No comments:
Post a Comment