Create the BookDetail type

  1. At the end of each row in the operations diagram is an arrow pointing right. Click on the one corresponding to newBook. This will open an Inline Schema view showing the element newBook.
  2. Right-click anywhere in this view and select Set Type > New.
  3. In the New Type dialog box, select Complex Type (the default) and type BookDetail then click OK. This adds a new diagram to the editor.
  4. Right-click BookDetails and select Add Element. This creates a new row.
  5. The editor should automatically highlight text NewElement and allow it to be changed. Change it to Title. If focus is lost, simply double click on NewElement and change to Title. Leave the type as string.
  6. Right-click BookDetail (the heading row) and select Add Element. Change the name to Type.
  7. Repeat step 6 to add two more elements: Author and StockNo. All these elements should be of type string.
  8. Create one more element named ISBN. This will become type Long. Click string and select Browse from the drop-down menu. Choose long from the type list and click OK.
  9. Add the remaining three elements, using the Browse option to select the int type:
    • Retail (string)
    • Onhand (int)
    • Sold (int)
  10. Close the Inline Schema view.
Your diagram should now contain:
Parameter Data type
Title string
Type string
Author string
StockNo string
ISBN long
Retail string
Onhand int
Sold int