Creating Reports With Results Specific to the Current User
Overview
People often ask how to create reports using the filter and dashlet concept of "my items" to reduce the number of reports needed for displaying an individual user's data. The "Current User" filter option on reports can achieve the same results.
Prerequisites
- To create reports, you must belong to a role in Sugar that has "Edit" permissions enabled for the Reports module. For more information on configuring roles in Sugar, please refer to the Role Management documentation in the Administration Guide.
- You should be familiar with the basics of creating a report in Sugar. For complete steps to create reports, please refer to the Reports documentation.
Steps to Complete
The following steps describe how to create a report that shows all of the contacts that were created by the user who runs the report. Please note that contacts that are assigned to the user but created by someone else will not be included in this example report.
- Create a new report with the following settings:
- Report type : Rows and Columns Report
- Module : Contacts
- In the report's Define Filters step, click on the plus sign next to the Contacts folder to expand its related modules.
- Click on the folder name labeled "Created by User". This will update the Available Fields list below the module selector to show fields from the Users module.
- In the lower Available Fields panel, type the word "user" into the search window and then click on the field labeled "User Name".
- You will now see the User Name field in the Define Filters panel. Set the filter's operator to "Is" and the user name to "Current User".
- Click "Next" to continue through the report wizard's steps, using the Reports documentation as a guide if needed.
- Save the report with a name indicative of its variable nature such as "Contacts Created by You".
After saving, any user who logs in and runs the report will see only the records that they have created in the report's results.
Application
Opting for "Current User" dynamically changes the filter to the user who is logged in and running the report. This allows each user to see their relevant information without the need to create separate reports for each or adjust the filters each time the report is executed.
As a best practice, add the Name field from the module chosen in step 1 (e.g. Contacts) as a display column. This is the field that will be hyperlinked to each Sugar record in the report.
Also, consider assigning the report to the Global team or whichever team will benefit the most from seeing the list of records that they have created. Assigning the report to your private team will prohibit others from accessing the report and defeat the purpose of using the "Current User" filter.