Using the "ResourceName" field in Resources to chain resources together
Often users like to "drill in" to chart data. For example a chart might show a company's total sales by Product in a pie chart. Users might want to click on one slice of the pie chart and open a Grid showing details of what they have seen.
Orixa enables this, by allowing the addition of a special field to the Resources SQLStr field, which can then call the appropriate resource. Note that this means resoucres can be chained together
Steps to use of "ResourceName" system-field in your Orixa Resources
Adding "ResourceName" field |
Create a normal resources record. IT can be for a Chart or WorkSurface resource.
In the example the SQL: 'ContractItemsDashboardGrid' as ResourceName has been used. This will return a static field containing this text to each row in the result dataset. When the user clicks an item, Orixa will be able to access this item.Optionally your SQL can include an ID field. If an ID field is present, and the called resource requires one, the ID will be substituted into the resource which is called. |
Chained Resource |
Now create a second resource. This must have the name set by "ResourceName" in the calling resource (2.). Note that the second resource includes the wild-card operator "%d" (3.) which indicates where the ID field from the calling resource will be substituted in. Also, note that this resource includes the static field "TableName", which coupled with the ID field allows the user to click and see individual data related to the row in the resulting grid. |
Clickable chart creates clickable Grid
- The chart generated by the SQL in the first step above includes a horizontal bar-chart. When the user clicks on an item in the chart, the records referenced by the chart's bar are opened, using the second SQL resource.
- Because the second SQL resource includes an ID and TableName field the user can also click at this level to open individual records in the resulting grid.