This tutorial is part of a course that explains how to create and register apps for the Dashboard Framework. In this eighth part, you learn about context apps. These allow you to specify the configuration settings for all apps in a dashboard at dashboard level, rather than at app level (as is the case for a configuration app). The relevant context app is always visible in the corresponding dashboard, which means you are not required to access this first to configure settings.
In this step, you use the configuration app from part 4 as the starting point for the context app. You were able to configure the following settings in the underlying configuration app:
You could select whether you want to display the costs, the overall duration, or the number of telephone calls per branch and month in the app.
You could specify for which month you want to display this information.
You now make the following changes:
Since the metrics to be displayed are no longer selected via the configuration app, delete the corresponding parts.
You create a new pushbutton that, when clicked, transfers the selected month to the Dashboard Framework.
This procedure is part of a comprehensive tutorial about Creating and Registering Dashboard Apps. During this tutorial, you create and register apps and their data sources.
You create this Xcelsius app in the eighth part of the tutorial.
Note
Ensure that you have already performed the previous steps, as described in Tutorial Part 8: Create Dashboard with Context App.
Load the Xcelsius file ztut4_config from the fourth part of the tutorial.
In the graphics area, delete the label for the metric to be displayed because you have created a separate app for every possible metric.
Rows 14 to 16 of the Excel table contain information about selecting the metric to be displayed. Delete these rows.
Until now, the metric to be displayed was set using the SELECTED_METRIC connection. You no longer need this connection for the reasons mentioned above.
To delete the connection, choose SELECTED_METRIC
connection, and choose the –
(minus) pushbutton. Then close the Data Manager.
When this app is used in the dashboard, the user should be able to choose the required month from the Month
and Year
dropdown lists. However, the dashboard should only respond to the settings in these dropdown lists once the user has chosen a pushbutton with the label Apply
.
Create this pushbutton by dragging the Activation Pushbutton
icon from the Selection Elements
category on the Components
subscreen to the empty area on the right of the Year
dropdown list box. Choose the pushbutton and enter the text Apply in the Label
input field under General
in the pushbutton properties.
You want the Dashboard Framework to respond when the user chooses this pushbutton at runtime. For this purpose, first ensure that the contents of a cell (in this case, cell G14) switch between 0 and 1 each time the pushbutton is selected. You can do this as follows:
In cell G14, enter the formula =IF(G13=0;1;0).
Choose the pushbutton again and, in the pushbutton properties under General
, Data Insertion
, enter G14
under Source Data and G13
under Destination.
Cell G13 initially contains the value 0, which means that cell G14 contains the value 1. When the user chooses the pushbutton, the value 1 is written to cell G13. As a result of the formula, cell G14 then contains the value 0. The value in cell G14, therefore, switches between 0 and 1 each time the pushbutton is selected.
To enable the Dashboard Framework to respond to changes in cell G14, you have to create a connection that transfers the content of this cell.Proceed as follows:
Start the Data Manager by choosing
.Then create a connection. To do so, choose the +
(plus) pushbutton on the Definition
tab page.
Enter BUTTON as the Area Name
.
In the Area Type
dropdown list, choose the Cell
entry and specify G14 as the Area
.
In the Access
dropdown list box, choose the Read
entry, since the Dashboard Framework is only to read the content of this cell.
Then close the Data Manager.
The context app is always displayed at the top of the dashboard; the Dashboard Framework always reserves a certain part of the dashboard on the screen for the context app. For this reason, modify the dimensions of the app by reducing the Height
to a value of 180 pixels in the menu option .
Note
To ensure that the graphics elements do not disappear when the width is reduced, move them to the center of the graphics area before you change the size and return them to the top margin after you have changed the size.
You now have less space available for the Month
and Year
combination fields. For this reason, reduce the number of labels displayed for both combination fields to 6. To do so, select the combination fields consecutively, go to properties, and choose Appearance
and the Layout
tab. Then set the Number of Labels Displayed
to 6.
Save the Xcelsius file locally on your computer with the name ztut8_context.
Generate a Flash file (file name extension swf) from your Xcelsius file by choosing
. Save the Flash file with the name ztut8_context.With the Xcelsius file and the associated Flash file, you have created the user interface of your future context app.
Continue this tutorial by performing the next step, Tutorial Part 8: Register Apps. In this step, you register the apps in the Dashboard Framework.