Creating a link between applications  Creating an event for employeeSales

Chapter 5: Creating a Multipage Mobile Application with Transaction Support

Creating an employee list

This shows how to create an employee list application. The employee list shows total sales figures for each sales representatives, using information in sampledb. This will be the master application.

StepsCreating the employee list of sales reps

  1. In Mobile Web Studio, select Applications in the left pane, New in the Application Builder Status menu, and click the New button.

  2. In Application Builder, click the down arrow to the right of Add, and select Database Element.

  3. On the Database Element Definition window, define the database element:

    1. Select the Connection Cache option.

    2. In Conn Cache Name, select sampledb from the drop-down list.

    3. In SQL query string, enter this query:

      set rowcount 10
      select e.emp_id, e.emp_fname, e.emp_lname,
      s.cust_id,  (soi.quantity * p.unit_price) as
      sales_total from employee e, sales_order s,
      sales_order_items soi, product p where e.emp_id
      = s.sales_rep and s.id = soi.id and soi.prod_id
      = p.id and s.region = '@OP["region"="Western"]'
      set rowcount 0
      
    4. Click Preview and make sure these columns are included: emp_id, emp_fname, emp_lname, cust_id, and sales_total.

  4. Click Next. The Split window displays.

  5. Click Next. The Define window displays.

  6. On the Define window, select the “Records Contain Labels” checkbox, in “Labels are Displayed in Record” accept the default 1.

  7. Click Next. The Filter window displays.

  8. Click Next. The Configure Parameters window displays.

  9. On the Configure Parameters window, make these modifications (otherwise accept the defaults):

  10. Click Next. The Window Preview window displays.

  11. In Element Name, enter employeeSales.

  12. Click Next. The Continuous Capture window displays.

  13. Click Finish.

  14. In Application Builder, click Save to create the application.

  15. On the Finish window, make these changes (otherwise accept the defaults):

    Content tab In Name, enter employeeSales (no spaces).

    Mobile tab Select the Offline BlackBerry checkbox, then click Finish.

  16. Click OK to confirm.

  17. Click Close to close Application Builder.

  18. When you return to the Mobile Web Studio main window, select New from the Application Builder Status menu. The employeeSales application displays in the detail pane.

  19. In Mobile Web Studio, right-click the employeeSales application in the detail pane, and select Approval Status | Approved.

    Click OK to confirm.

  20. Select Approved from the Application Manager Status menu. You see your newly approved employeeSales application in the detail pane.





Copyright © 2005. Sybase Inc. All rights reserved. Creating an event for employeeSales

View this book as PDF