You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Step 1 – Create a Group By View

  1. In the Navigation Library, go to Data Management and then go to Views 
  2. Click New View and call it Dashboard View; set Primary Object to Client; click Save
  3. Click on the Fields tab and move the Client.Department and Client.Id fields into the panel on the right
  4. Click on the Gear icon at the left of the Client.Id field to see the Linked field properties pop-up
    1. Set the Function field to Count
    2. Click Save
  5. The SQL text will look like this: select A0.COL_ID ID, Count(A0.COL_ID) CLIENTID, A0.COL_DEPARTMENT CLIENTDEPARTMENT from TBL_CLIENT A0 group by A0.COL_ID, A0.COL_DEPARTMENT
    1. We need to edit it because we aren't counting by both ID and Department, only Department; thus we removed all references to A0.COL_ID
    2. The result will be this: select Count(A0.COL_ID) CLIENTID, A0.COL_DEPARTMENT CLIENTDEPARTMENT from TBL_CLIENT A0 group by A0.COL_DEPARTMENT
    3. Click Save
  6. Deploy your solution, log out and log back in.

Step 2 – Debug the View as a Rule

  1. In the Navigation Library, go to Business Rules and click on Rules 
  2. Find the Dashboard View and click on the debug icon 
  3. Click on Run 
  4. This rule will run on dummy data added through the previously built pages and should look something like this
  5. CLIENTID displays the count of the number of client id's associated with each of the 4 departments

Step 3 – Debug the View as a Rule

  1. In the Navigation Menu, click on Presentations and Pages 
  2. Add a new page called Dashboard View of Category General and Template Blank
  3. Click Save and launch the Page Builder
  4. Add a Unified Store called storeDash
    1. Edit the Properties: set its Data Source Type to Business Views and the Data Source to Dashboard View
    2. Check the List checkbox
    3. Remove the element called Id, so that the only elements left are ClientId and ClientDepartment
    4. Click Save
  5. Into pnMain add a Chart Dashboard and call it chartDepartmentCount
    1. Click Settings to configure the chart
      1. Click the Existing radio button for Store Type
      2. Select storeDash[List] as the Store adapter
      3. Click Apply
    2. Click on the Dashboard Settings tab
      1. Select Chart from Dashboard Type
      2. Select ColumnChart from Chart Type
      3. Set the XAxis to ClientDepartment
      4. Set the YAxis to ClientId
      5. Click Save
    3. Click the Preview tab to see a preview of your chart
  6. Click Save Page at the top left of the screen; click Ok to the Page was saved pop-up.
  7. Add this page to your application, deploy, log out and log back in to view it as part of your solution.
  • No labels