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

**URL:** <https://forums.pega.com/t/create-widget-select-manager-in-dropdown-and-show-team-members-list-in-dashboard/9039>\
**Category:** User Experience\
**Tags:** platform, customer-service-developer, user-experience, pega-platform\
**Created:** [February 18, 2025, 10:27am UTC](https://forums.pega.com/t/create-widget-select-manager-in-dropdown-and-show-team-members-list-in-dashboard/9039 "2025-02-18T10:27:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![praneetv9588](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/praneetv9588/32/1467_2.png) [@praneetv9588](https://forums.pega.com/u/praneetv9588)\
**Post date:** [February 18, 2025, 10:27am UTC](https://forums.pega.com/t/create-widget-select-manager-in-dropdown-and-show-team-members-list-in-dashboard/9039/1 "2025-02-18T10:27:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MarijeSchillern](https://yyz2.discourse-cdn.com/pega/user_avatar/forums.pega.com/marijeschillern/32/23321_2.png) [@MarijeSchillern](https://forums.pega.com/u/MarijeSchillern)\
**Post date:** [March 24, 2025, 12:29pm UTC](https://forums.pega.com/t/create-widget-select-manager-in-dropdown-and-show-team-members-list-in-dashboard/9039/2 "2025-03-24T12:29:29Z")

</div>

@praneetv9588 ⚠ T **his 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:

```auto
// Report Definition example

```

```auto
When: pxCreateReport

```

```auto
If: true

```

```auto
Then:

```

```auto
  // Add columns for team members and case volumes

```

```auto
  .AddColumn("pyAssignedOperatorID", "Team Member")

```

```auto
  .AddColumn("Count(*)", "Case Volume")

```

```auto
  

```

```auto
  // Add filter for manager selection

```

```auto
  .AddFilter("pyManager", "=", @param.ManagerSelection)

```

```auto
  

```

```auto
  // Group by team member to show case counts

```

```auto
  .GroupBy("pyAssignedOperatorID")

```

```auto
  .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:

- [Creating widgets and displaying them on the dashboard](https://docs.pega.com/bundle/robot-manager-241/page/robot-manager/content/using-create-and-display-widgets.html)
- [Configuring a dashboard](https://docs.pega.com/bundle/platform-241/page/platform/user-experience/configuring-dashboard-page-1.html)
- [Creating custom reports](https://docs.pega.com/bundle/robot-manager-241/page/robot-manager/content/reports-create-custom-reports.html)
