- SCU Home Page
- About SCU
- On Campus
- News & Info
- Web Publishing
- About Web Publishing
- Getting Started
- CommonSpot Help
- Design Resources
- Publisher Resources
- Contact Us
Selecting data using a filter
Some Commonspot elements include an option to select data using a "filter". This option allows you to select one or more items from a large set of records, based on your own filter criteria. Here's how to do that, using a filter applied to Profile element data as an example.
In this scenario, we want to select all faculty members in the Education department from the Profile element data set. First, we'll add the Profile element to the page. You'll find this element in the Content Well element gallery category. Click the "gear" icon to expand the element menu and select "Render Mode".
The two rendering mode options are to display data added to the current page, or re-use existing data added to other pages. That's what we want here - we're going to display Profile data that was added to pages in the Education site. Select "Display existing element data" and "Render results dynamically based on a filter".
Next, click the "Filter" tab at the top of the Render Mode form.
Here's where we'll set the selection criteria to get profiles for Education Faculty members. The filter form lets you enter values to be matched against Profile form fields. First, select "Show subset of records". Then we'll select profiles in the "faculty" group, and in the "Department of Education" organization.
NOTE: It's important to be as precise and efficient as possible when selecting data for display. It's best to use just three or fewer fields, and use the "Equals" operator to limit the number of results returned. If the standard profile fields aren't suitable for limiting the selection, you can add a unique tag to the individual profiles and use that in your filter.
We want to get the results returned in alphabetical order by last name, and we set that in the "Sort Order" section of this form.
Click "OK" to complete the process ("update" will allow you to preview the selection). The Profile element will display the full profile by default. To switch this to a summary list, we will apply a different custom render handler.
Select "Custom Render Handlers" and choose "Content Well Summary Profile" from the list. Click "next" to apply this rendering.
We're done. Here's how our filtered Profile data appears:
Error in custom script module