category selection. Similarly, queries will have to be written against product tables to fetch/validate product description, product colour, size and price. Additionally, business rules will have to be written to determine the total amount based on the quantity, price and items ordered.
In OrangeScape paradigm, this will be achieved by establishing relationships between data models. Data models in OrangeScape are a "Network of objects". In a network, any object can be accessed from any level through these relationships. Hence, the links needed not be established during the run-time, as in the case with traditional development method. The business rules are built in the data models which are automatically executed by the rule engine.
Now, let's get started with establishing the required relationships for the orders data models.
Connect as reference, but with criteria: "Product" and "ProductOrders" data models
The easiest way to achieve this is by creating a reference look-up for product description in ProductOrders data model. But if we were to do that, then we will have to somehow validate whether the product selected by the user belongs to the category selected by the user.
Is it possible to filter the product description data that is displayed in the list box when a reference look-up is created?
The "Connect" option provides two ways to achieve this.
Connect as reference, but with criteria: "ProductColour" and "ProductOrders" data models
The list of available colours must be displayed for the product selected. To achieve this, reference look-up relationship, with criteria to filter colour based on product selected, must be established between "ProductColour" and "ProductOrders" data model. Follow the directions given below.
The available sizes must be displayed for the product-colour combination selected. To achieve this, reference look-up relationship, with criteria to filter size based on product & colour selected, must be established between "ProductSize" and "ProductOrders" data model. Follow the directions given below.