Create Widget- Select Manager in dropdown and Show Team Members List in Dashboard

Hi All,

I have a requirement where i have to select manager name from drop down given in Widget. On selection of Manager name it should show all team members name and the vol of cases has each member.

@praneetv9588 :warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

Here’s a comprehensive step-by-step guide on how to implement this functionality:

Creating a Widget with Manager Dropdown and Team Member Case Volumes

To create a dashboard widget that displays team members and case volumes based on manager selection, you’ll need to follow these steps:

Step 1: Create a Report Definition

First, create a report definition that will serve as the data source for your widget:

  1. Navigate to Dev Studio and create a new report definition in your application’s Ruleset
  2. Select the appropriate class that contains case data (e.g., Work- class)
  3. Include columns for team member names and case volumes in your report definition
  4. Add a parameter for manager selection that will be used for filtering

Step 2: Configure the Report Filtering

In your report definition:

  1. Add a filter condition that uses the manager parameter
  2. The filter configuration should look something like this:
  3. // Example filter configuration
  4. @baseclass
  5. .ReportDefinition
  6. .AddFilter("pyManager", "=", @param.ManagerSelection)

Where pyManager is the property that contains the manager name and @param.ManagerSelection is the parameter that will hold the selected manager’s value

Step 3: Create a Section for the Widget

  1. In Dev Studio, create a section that will display the report
  2. Add a chart or list control to the section that will visualize the data
  3. Configure the control to use the report definition as its data source

Step 4: Configure the Widget

  1. In the Section’s chart/list control properties:
    • Set Type to “Report Definition”
    • For Applies to, select your report definition
    • Configure the visualization details (chart type, colors, etc.)
    • Set up the parameter mapping for the manager selection

Step 5: Add the Widget to the Dashboard

  1. Navigate to the dashboard where you want to add the widget
  2. Click on “Personalize the dashboard” (gear icon)
  3. Select your newly created section from the available widgets
  4. Add it to the dashboard layout

Step 6: Configure the Dropdown Filter

  1. In the dashboard configuration, add a filter element
  2. Configure the filter to populate with manager names
  3. Set up the relationship between the filter and the widget parameter

Step 7: Test and Publish

  1. Test the functionality by selecting different managers from the dropdown
  2. Verify that the correct team members and case volumes appear
  3. Publish the dashboard when everything works as expected

Sample Configuration Code

Here’s a simplified example of the report definition with the manager filter parameter:

// Report Definition example
When: pxCreateReport
If: true
Then:
  // Add columns for team members and case volumes
  .AddColumn("pyAssignedOperatorID", "Team Member")
  .AddColumn("Count(*)", "Case Volume")
  
  // Add filter for manager selection
  .AddFilter("pyManager", "=", @param.ManagerSelection)
  
  // Group by team member to show case counts
  .GroupBy("pyAssignedOperatorID")
  .OrderBy("Count(*) DESC")

This implementation allows you to:

  1. Select a manager from the dropdown
  2. Automatically refresh the widget to show that manager’s team members
  3. Display the number of cases assigned to each team member
  4. Sort the display by case volume (highest to lowest)

References: