How to Prevent Users from Removing a Mandatory Filter in an Insight?

Hi Team,

I have created a landing page using an Insight that displays a list of cases for the logged-in user.

The Insight is based on a Data Page, and the Data Page source is a Report Definition. To restrict the data shown, I added the following filter in the Insight:

  • Field: Operator ID
  • Operator: Is equal to
  • Value: .pxRequestor.pyUserIdentifier

The requirement is to show only records assigned to the logged-in operator.

My concern is that the filter is visible and editable in the Insight. If an end user accidentally removes or modifies the filter, the landing page may display unintended results.

Questions:

  1. Is there a way to make this filter read-only or non-removable in an Insight?
  2. Can mandatory filters be enforced so users cannot modify them?
  3. Since the data is coming from a Data Page backed by a Report Definition, would it be better to move this condition into the Report Definition itself?
  4. What is the recommended approach for implementing a secure “My Cases” view in Constellation?

Has anyone implemented a similar requirement or found a best practice for preventing users from modifying mandatory filters?

Thanks in advance for your suggestions.

Hello @Vinod_Kuncham

I don’t think there is an option to hide the custom filters applied directly on the insights when shown as a table.

Rather than putting up specific filters on the insight, you can apply these filter while you retrieve the data itself in the report definition.

By the looks of your screenshot, its a table of records displayed in a landing page. Rather than insights you can go for a simple List view based on your data page that will provide the same outcome.

  1. Ensure that the report definition has as many filters as possible. Apply associations and additional filters on the RD itself that will fetch you records which are intended for your requirement.
  2. If you see that you need to pass any dynamic values as parameters to your query, then setup the data page parameters and pass them from your list view calling.

This way you will avoid applying custom filters on the table showing them to the users. Users can apply their own filters on the records which you show them by default.

Go for insights when you need to display the report as fancy bar chart, pie chart, trends, etc. For simple tables, choose list views.

Below are couple of posts on the same topic. Worth reading…

Hope this helps

Regards

JC

Hi @JayachandraSiddipeta
Thank you for taking the time to provide such a detailed explanation and solution. It worked perfectly for my use case, and your suggestions around using the Report Definition filters and List View approach helped me achieve the expected outcome without exposing the filters to users.

I really appreciate the effort you put into explaining the different options and sharing the additional resources. Thank you so much again for your guidance and support! :blush: