What is it?
If your directory search results are not appearing correctly for your users, either your attribute security settings or your directory search template is likely at fault. Attribute security determines what one user can see of another, while the template determines what attributes appear on the results page. If a user cannot see the necessary criteria attached to a directory search, or the template is incorrect, then they will receive incorrect results. This article will explain how to correct this issue. If you've yet to build a directory search and would like to do so, it's best to first read this article.
How to access
View your directory search by going to Community->Directory->Hover over the directory search you want to edit, then click the edit button that appears out to the right. Your directory search page will look similar to the screenshot below. This screenshot focuses on the key items within your directory search that affect what your users can see.
1. These are the directory's searchable attributes. Whatever is listed here are the fields that the users will be able to search, provided that they possess the ability to see the fields. You can add more searchable attributes by selecting the 'Add An Attribute' drop-down that is pictured just above the searchable attributes.
2. If a Member Type is selected in this drop-down, then the users in that Member Type are eligible to appear in your search results.
3. This is an optional attribute filter. If an attribute is chosen in this drop-down, and a selection within that attribute is also chosen, then only the users that possess that selection within the attribute will appear in your search results. Using the example above, the custom attribute 'Directory Search Opt-in' has been selected as our filter. You'll see that the attribute's selection of 'Yes, I'd like to appear in the results' has been checked. This means that only the users who have the selection 'Yes, I'd like to appear in the results' selected in their profile will appear in the results. If a user does not possess this attribute in their profile, or they do but do not have the selection used by the filter selected, then they will not appear in the results.
If you want either A) your users to be able to determine if they appear in the directory results or not, or B) want some users within a specific Member Type to appear in the results, but not others, utilizing this filter option is your best bet.
All of the above options have one thing in common: if a user does not possess the attribute security permission to see the attributes attached to the search, then they will not receive correct results. Let's explore how to fix that.
To navigate to the attribute security page, go to Database->Attributes->Click the Group Attribute Security link in the upper right-hand corner of the page. Once here, your screen will initially look similar to the below.
This page determines what the group chosen in the Select Group drop-down, which is in the upper left-hand corner of the page, can see of all the other groups in your account, which are represented in the columns on the right side of the page. Using the screenshot above as an example, we have the Admin group chosen in our Select Group drop-down. This means we're determining which attributes admins can see, or edit, within all of your groups in the system.
If you look in the first column, you'll see that the Prospect and Linked Profile Member Types are listed at the top of the column. As Admin is chosen in the group drop-down, this first column determines what the Admins can see of the Prospects and Linked Profiles in the system. This works the same for all the other columns. If you, for example, don't want admins to be able to see or edit all of the information of the Organization Member Type, which is represented in the fourth column in our screenshot, then you would edit the permissions listed in the fourth column. This will limit what admins can see of the Organization Member Type.
The above is relevant to your directory search because if those performing the search are not permissioned to see the key attributes we discussed earlier, which are Member Type, any searchable attributes, and any attribute used to filter the search, then the user performing the search will either receive limited results, or no results at all.
Let's say the public is performing the search for those in the Member Member Type, which is represented in the third column in our screenshot, but they are not receiving any results. To correct that, first click on the Select Group drop-down in the upper left-hand corner of the page and choose Public from the drop-down. This changes our screen to look like the below:
We're now determining what the public can see of your users in the system.
Next, we'll want to confirm what the public needs to see to run our directory search. Using our search example from earlier, the public needs to possess the permission to see the Member Type attribute of Members, the Directory Search Opt-in attribute, and the first and last name attributes, as those are the fields used to search.
When checking the permissions in the Member column, we'll find the below next to the first and last name fields.
The eyeball icon means the public has permission to see these attribute fields, so they can see and search for the first and last name fields in our directory search. If we check the permissions of the Member Type and Directory Search Opt-In, however, we'll see the below:
These red Hidden symbols mean the public cannot see either of these attributes. As the directory search is built on these attributes, this will prevent the public user from being able to successfully run and receive results through the search. If you click on the Hidden icons, you'll have the option to change them to the View icon, which will allow the public to see the attributes as needed. Once we've changed all of the directory attributes to be viewable by the public, they will be able to successfully run and receive results through our search.
If your attribute security is correctly set, but the correct attributes are not appearing when you receive the results, then your directory template needs to be edited. To learn how to edit your directory template, click this link to be taken to our guide on the subject.