Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

By the end of this section you will be able to:

  • Create linked views on a dashboard

...

Create a linked view

Views on dashboards can be "linked" so that the results shown in one view can be filtered based on the rows selected in a "driver" view. If you did the User Course you will have used a linked view.The following video illustrates how to create linked views:

Widget Connector
width900
urlhttps://www.youtube.com/watch?v=vu6RXQNH9K0
height500

To recap the steps in the video:

  1. Create a new dashboard Debt Analysis

...

  1. Add a horizontal bar
  2. Add a vertical bar in the top pane
  3. Open the model Dashboards and Forms 01-08: Views, filters and dashboards

...

  1. Open the

...

  1. stream configuration form for Overall payment levels

...

The view shows the total amounts paid on each day by each payment method.

...

  1. Drag the

...

  1. view Debt totals by payment means

...

  1. into the top left pane
  2. Drag the view Overall Debt Levels into the top right pane

...

Now you will make Debt totals by payment means a driving view and link the other two views to it:

...

  • In the form that pops up, update Element Name to DebtTotals
  • Press Image Removed - Apply
  • Press Image Removed - Close

...

  • Name: by Payment Means
  • Conditions
    • Where ALL the following are true
    • PaymentMeans equals DebtTotals.PaymentMeans
      • (The expression DebtTotals.PaymentMeans gets the value of PaymentMeans from the selected record in the driving view)
    • Press the ABC button - this will now say fx
    • When you have completed all these details press Image Removed
    • Set this filter to be applied on the view in the dashboard:
      • In the banner press Image Removed
      • Press Image Removed - Show chart details
      • In the chart parameters configuration form:
        • Tick the flag Use Custom Default Filter
        • Select the filter by Payment Means
        • Press Image Removed - Apply
        • Press Image Removed - Close

...

  1. Open the stream configuration from for Overall payment levels
  2. Drag the view Overall payment levels into the bottom pane

To link the top two views:

  • Grab the column heading Payment Means from Debt totals by payment means (top left) and drag it over Overall Debt Levels (top right)

You can now see that the top left view "drives" the top right view - click on a row in the top left, you will see the data in the top right update automatically - this should now only shows rows for the matching Payment Means.

To link the top left view and the bottom view:

  1. Get the element name of the top left view: right click, and go to Dashboard Options → Show Element Details
  2. Copy the element Name
  3. Create a filter on the bottom view (Overall payment levels):
    • Name: Link to Payment Means
    • Conditions
      • Where ALL the following are true
      • PAYMENT_MEANS equals

...

      •  Debttotalsbypaymentmeans.PaymentMeans
      • Press the ABC button - this will now say fx
    • When you have completed all these details press Image Modified
  1. Set this as the background filter

...

  1. on the view

...

  1. :

...

    • Right click on Overall payment levels on the dashboard and go to Show the Stream View Configuration
    • Tick the flag Use Custom Default Filter

...

    • Set Background Filter to Link to Payment Means

...

    • Press OK

Click on a row in the top left driving view

...

. You will see the other two views update to show only the rows for the payment means selected in the driving view

...

You can make the update of driven views automatic – that is, every time a record in the driving view is selected, the records in the driven views will be updated straight away. This is not always desirable – for example, where users will commonly wish to select several records in the driving view before updating the driven views, or where large amounts of data are involved and the refresh takes some time.
You will make the driving view you created in the previous exercise update the driven views automatically:

...

  • In the form that pops up, update the radio button Apply Selections to Auto
  • Press Image Removed - Apply
  • Press Image Removed - Close

...

Note

As a design principle, it is always best to make sure that fields that contain a particular piece of data are called exactly the same thing. But when building linked view - and when you get into building applications - this is even more important, because having matching names makes configuring much easier.