What is a Filtered Page?
A filtered page is a copy of a page in MinistryPlatform with an additional criteria (rule) applied to limit which rows of data (records) appear on that page. A filtered page can have its very own, reports, tools and page views. Often creating a filtered page results in creating a new Security Role to go with it. Permission to use the filtered page can be granted to existing or new Security Roles. Field restrictions can be applied to the page through the Security Role so that users see only fields they require.
At our MinistryPlatform User Group Meeting in 2015 Kevin McCord shared this document which provides an overview of filtered pages.
Video Topics: How to Create a Filtered Page
0:56 - Creating a New Page
2:16 - Adding Rights to Security Roles
3:27 - Customizing the Page
6:10 - Adding Users
How might a Filtered Page be used?
Filtered pages might be used to grant some users rights to a subset of the information on a particular page. For example, a filtered version of Donation Distributions allows some users to see only the Donations distributed to a subset of Programs. As another example, if you wanted someone to be able to view, edit and delete any Household Care Notes except Benevolence, you then can create a filtered page for Household Care (No Benev) and filter out that type of care.
Filtered pages might be used to simplify the user interface giving users access to only the records and fields they need for their particular ministry. For example, a filtered Groups page might list only "Small Groups" and it might hide all fields related to check in and promotions that are needed primarily by other types of groups.
Filtered pages were used previously to ensure some users can only access information related to their campus (aka Congregation). So, a Spanish group might only see events for the "Spanish Congregation." Similarly, the Downtown Campus group might only see events related to their campus and church-wide events. Filtered pages can be aware of the user who is using them so that a single filtered page called "Campus Events" could be created such that it would be used by 3 people at 3 campuses and they would each see the events appropriate to the congregation they serve. With the addition of Global Filters to the Platform, this is a better way to handle these scenarios moving forward.
Filtered pages could be used on the Custom Form and All Form Responses pages to limit users who are able to see sensitive information that may have been collected via a custom form.
How do you create a filtered page?
The simplest answer to this question is that you can copy an existing page, rename it and apply filter criteria to the new page. It is often helpful to use the Advanced Search tool on the page you plan to copy to develop the criteria you want to use. Just copy it from the "SQL Layout" tab of the advanced search tool.
How do you deploy a filtered page to users?
No one is able to access the filtered page until you grant some rights to the new page through a security role. As a best practice, give the Administrators security role full rights to this filtered page immediately after you create the filtered page. Typically you want to create or locate another Security Role for the actual end users for whom this filtered page is intended.
Can I apply a filter to an existing, unfiltered page?
This is not recommended. As a best practice, leave the pages that came with MinistryPlatform unfiltered. Instead, create a copy of the Page and filter it. There should always be an unfiltered version for the api to use and it should be the only unfiltered version. In other words, there should always be one unfiltered Page for a table and all others should be filtered.
How do I add things to a filtered page that existed on the original page? For example, Reports on the original page do not show on the filtered page.
Reports, Tools, Sub Pages and Page Views are the kinds of things that might need to be made available to users of your filtered page.
Adding Reports & Tools: To add reports and tools to a filtered page two things must happen. The tool must be deployed to the page. Do this by opening the tool and adding the filtered page to the Pages sub-page of the open Tool record. The tool must also be permitted on a Security Role to which the users belong. If you created a Security Role specific to your filtered page you may want to add the tools and reports to this security role. Note that some tools and reports are specific to a table in the database. A good rule of thumb is that you can ONLY add tools and reports to the filtered page if they were available to the original page upon which the filtered page was based.
Adding Page Views: These can be created on the new page OR copied from the original page. Remember, page views are contextual to the database table upon which your page or filtered page is based. All of the normal rules about Page Views apply. If the page view is owned by a user only that user can see the page view unless it is shared with a user group. If the page view is not owned by a user and it is not available to a user group, then it is visible to all users of the filtered page. If you create a view on the filtered page with the advanced search tool, you may need to remove your user record from the Page View record in System Setup.
Adding Sub Pages: Unless you are a very advanced user of the System Setup are, you are not able to create your own sub-pages for your filtered page. The only viable option for most system administrators is to copy a sub-page that was present on the original page, edit it and assign it to the filtered page.
Turn a Page View into a Filtered Page
View restrictions which existed in the original MinistryPlatform have been replaced in the latest Platform by Filtered Pages.
A filtered page can be separately secured. It can have its own list of reports, tools and views. Fields that you don't want the end user to see can be restricted in Security Roles that grant users rights to a filtered page.
The following steps illustrate how one might take an existing Page View and use the View Clause in that view as the basis for a Filtered Page:
Locate a view that has the conditions you want to use as a filter on your new page.
In System Setup > Page Views, locate the desired View and copy the View Clause.
In System Setup > Pages, open the desired Page record.
Copy the page (and sub-pages if desired).
Paste the View Clause from your view into the Filter Clause of this new, copied page.
Open the Administrators security role and give Administrators rights to this new page.
Create a new Security Role and grant that Security Role rights to the page (it's OK to use an existing role, but only if you are sure about what that role does otherwise).
Add field restrictions on this page in the new security role if needed.
Add users to the new Security Role.
Add tools to the new Security Role (optional).
Add reports to the new Security Role (optional).
Note: Any views associated with any sub-pages that you copied as a part of your filtered page, will not also be copied to the new sub-pages for your filtered page. To associate the sub-page views that were a part of the original page to your new sub-page:
Go to the Sub-page views page.
Open the view you want to be associated with your new sub-page.
- Copy the view.
- Edit the view and associate the view with the new sub-page that is associated with your new filtered page.
Copy views from the original page into the new page. If you do not copy the existing views when you create the page, you will need to make new views for the page as each view can only be associated with one page at a time.
Open up reports on the reports page and assign them to the new page.
Put the new page in a Page Section (new or existing).
Things to be aware of:
- There should always be an Unfiltered version for each table. The API uses the unfiltered version. All other Pages accessing the table should be Filtered.
- Jump links will always go to the main page (not the filtered page).
- Links in user tasks will always go to the main page (not the filtered page).
- All Filtered pages should have a filter clause.