Panel Links in a multi-panel plansheet
Model Relationship Links
Each model contains explicit relationship links between classes.
These relationships can be used to move through the model and pass a ‘context’ between plansheets. When resource data such as the rows of the class are imported into the model, the data must include any relationship links to a parent class. For example, when importing Products At Locations class, the Products.Name and the Locations.Name must be included to allow the engine to connect this resource to the resources in the parent classes. Therefore, all parent classes must be imported before child classes.
This image illustrates a typical Planning Engine model:
In this example, the model definition has ‘components = Products, Locations;’ in the Products At Locations class. The locations and Products classes also have "CHILDREN { Products At Locations ; };". This defines the relationship link that can be used when importing resources.
These properties must be specified to import a Products At Locations resource:
- Products.Name
- Locations.Name
- Products At Locations.Description
The Name property is always the key in each class. For Products At Locations the name is derived from the joining of the parent class names. For example, Products.Name + ‘@’ + Locations.Name.
These properties must be specified for the Customer Allocation Class:
- Products.Name
- Locations.Name
- Customers.Name
- Customer Allocations.Description
- Customer Allocations.Name
Simple Panel Link
A simple panel link can be used to connect a Products Panel to a Products At
Locations panel by passing the context of the resource clicked in the Products
panel. This can be achieved by specifying the passed Resource as [Products At
Locations]@[Products]:[%passedValue%]
. This ensures that the receiving plansheet
uses the [Products At Locations] resource class, and the context of the passed resource in
the [Products] class.
Complex Panel Link
A complex panel link can be used to open the Customer Allocations class from a single Product resource. In the example above, there is a relationship link between Products and Customer Allocations using Products At Locations. We can use this to open the Customer Allocations class from a single Products resource.
This can be achieved by specifying the passed Resource as [Customer
Allocations]@[Products At Locations]@[Products]:[%passedValue%]
. This ensures
that the receiving plansheet uses the [Customer Allocations] resource class, using all
resources where there is a [Products At Locations] resource for the selected resource in the
[Products] class.
Queries in Links
You can use Queries in panels and panel links. For example, if a query called ‘High Sales Prods’ is defined as Products At Locations.Revenue > 1000, and you require to view all Customer Allocations and a specific Products resource where the Query condition is met, you can use the Query on the Products At Locations class in the same way as you use the actual class.
This can be achieved by specifying the passed Resource as [Customer
Allocations]@[%High Sales Prods]@[Products]:[%passedValue%]
. This ensures that
the receiving plansheet uses the [Customer Allocations] resource class, using all resources
where there is a [Products At Locations] resource with revenue greater than 1000 for the
specific resource in the [Products] class.