Build a Dashboard to Dynamically Populate/Filter Data on Page Elements
1. Requirement
Improve user experience with an interactive dashboard that dynamically updates the content of dashboard elements based on button actions.
2. Use Case
Consider an organization utilizing Zoho Creator task management application to manage their team's tasks. The application features a comprehensive dashboard page that displays task information relevant to each team member based on their login email address. Additionally, it dynamically adapts to showcase task information for the entire team when a designated button is clicked, seamlessly transitioning to a team-wide dashboard view.
3. Steps to Follow
Form | Form Link Name | Field Type | Field Name | Field Link Name |
Add Task | Add_Task | Single Line | Task Name | Task_Name |
Multi Line | Description | Description |
Drop_Down | Assign To | Assign_To |
Radio | Priority | Priority |
Drop_Down | Status | Status |
3.2. Create Dashboard

Note: The following steps outline the process of designing a dashboard that aligns with our specific use case. Feel free to customize your own dashboard to suit the unique requirements of your use case.
- Create a page named 'Dashboard.'
- Add the below mentioned page variables to the page. These variables will be used in the page elements to display dynamic values
Variable Name | Data Type |
inProgress | int |
open | int |
completed | int |
highPriority | int |
dashboardType | string |
searchQuery | string
|

- Drag and drop a panel into the page.
- Replace the existing panel elements with a text element, Set the display value as ${dashboardType} to dynamically showcase the specific dashboard type
- Add two buttons in the panel with the label Team Dashboard and My Dashboard.

- Configure the Action for buttons as shown below. On configuring, when the buttons are clicked, the page refreshes with the respective query parameters.
Action | Team Dashboard | My Dashboard |
Action type | Open Page | Open Page |
Page | Dashboard | Dashboard |
Query parameters | dashboardType=Team Dashboard | dashboardType=My Dashboard |
Open in | Same window | Same window |

- Include four more panels to the page to show the count of the tasks with respect to the status and add a text header into the panel as shown below.

- Configure each panel's Display settings for the header as shown below.
Display | Panel 1 | Panel 2 | Panel 3 | Panel 4 |
Display data | Page Variables | Page Variables | Page Variables | Page Variables |
Select Variable | inProgress | open | completed | highPriority |
Show variable as | Actual | Actual | Actual | Actual |
Units | None | None | None | None |
Format | 1,234,567 | 1,234,567 | 1,234,567 | 1,234,567 |

- Add a sub header for each panel to show the status information. Configure the subheader's Display settings as shown below.
Display | Panel 1 | Panel 2 | Panel 3 | Panel 4 |
Display data | Text | Text | Text | Text |
Value | In-Progress | Open | Completed | High Priority |

- Arrange the panels as shown below.

- Embed the report of the Add Task form below the panels in the page in our case the report name is All Tasks. In the upcoming step, a filter will be applied to this report to display tasks related to the logged-in user.

- Set filter for the embedded report by clicking Filter in the configuration page of report element.

- Click Add filter and enter the below details to filter report based on the value supplied to the searchQuery page variable. The value for the searchQuery page variable will be supplied through page script in the following steps.
Filter | Select Field | Select Operator | Enter Value |
Assign To | Contains | input.searchQuery |

3.3. Add Page Script
- Navigate to the page script and enter the below script to your page.
- // Fetch the task information related to the logged-in user and supply it to the page variables.
- input.inProgress = Add_Task[Status == "In Progress" && Assign_to == zoho.loginuserid].count();
- input.open = Add_Task[Status == "Open" && Assign_to == zoho.loginuserid].count();
- input.completed = Add_Task[Status == "Completed" && Assign_to == zoho.loginuserid].count();
- input.highPriority = Add_Task[Priority == "High" && Assign_to == zoho.loginuserid].count();
- //Filter the report to display tasks assigned to the logged-in user.
- input.searchQuery = zoho.loginuserid;
- //Fetch task information of all team members when the user clicks the Team Dashboard button on the dashboard, Conversely, load the default page when the user selects My Dashboard.
- //The report filter page variable 'searchQuery' is intentionally set to an empty string, ensuring that the report remains unfiltered and loads all records.
- if(input.dashboardType == "Team Dashboard")
- {
- input.inProgress = Add_Task[Status == "In Progress"].count();
- input.open = Add_Task[Status == "Open"].count();
- input.completed = Add_Task[Status == "Completed"].count();
- input.highPriority = Add_Task[Priority == "High"].count();
- input.searchQuery = "";
- }
- else
- {
- input.dashboardType = "My Dashboard";
- }
4. See How It Works
- Page script and variables
- Add and manage page elements