Creating a Query that Returns the Orders
Procedure
-
In the Services Explorer , in the context menu of order_srv , choose .
-
For Name , enter OrderService and , for Description , This service contains queries and custom methods for accessing Orders .
-
Choose Finish .
The Services Editor opens
-
In the Services Editor of the service OrderService , switch to the Operations tab.
-
Add a new operation by choosing Add .
-
For Operation Type , select Query . For Name enter getOrderHeaders . For Description, enter This query returns the headers of all local orders .
-
Choose Next .
-
Choose Add Input .
-
In the table, choose Add to create an input parameter. For Name , enter pi_customerid and, for Type , select string . Choose OK .
-
Choose Add Output , select OrderOrderHeader and choose OK .
-
Choose Add filters . From the top two dropdown boxes, select OrderOrderHeader and CustId. From the middle dropdown box, select = (equals). From the bottom two dropdown boxes, select From Input Parameter and pi_customerid .
-
Choose Finish to close the wizard.
-
Save your work.
-
Build the component: In the context menu of the order_srv component , choose .
For more information, see Creating Queries and Custom Operations .

