Customizing Search Bar for Specific EntityType Based on User Profile

Hi everyone,

I need to implement a search bar for a specific entityType, but with customized search criteria based on the user’s profile. The official documentation for the <searchBar> tag doesn’t seem to support this functionality out of the box.

I noticed there’s a scaffolding template called SearchBarPageAccessControl, which appears to be profile-related, but I’m unclear on:

  • What its exact purpose is.
  • Whether it can be used to achieve our goal (i.e., restricting/dynamically adjusting search filters for certain users to simplify their experience).

Our use case: We want to reduce the number of search criteria displayed in the search bar for specific user roles to make it more intuitive.

Has anyone faced a similar requirement or found a workaround? If so, I’d greatly appreciate insights on:

  • How you implemented profile-based search bar customization.
  • Whether SearchBarPageAccessControl (or another approach) was used.
  • Any potential limitations or gotchas.

Thanks in advance for your help.
Thierry

Hello,

The “SearchBarPageAccessControl” is used to allow authorized profiles to dispay the SearchBar in different pages of the solutiuon (RolesReview, ManualProvisioning, etc.)

Regarding your request, the easiest way I can think of is to use the advanced criteria option (IsVisibleInAdvancedView=“true”) when configuring the SearchBar.

Example:

  <SearchBar EntityType="Directory_User" Menu="Search_Directory_User" SearchBarDesignElement="Inline">
    <Criterion Binding1="Identifier" PlaceHolderText_L1="Identifier" InputType="Auto" ColumnSize="2" />
    <Criterion Binding1="PhoneticFirstLastName" Binding2="PhoneticLastFirstName" Binding3="MainRecord.LastName" Operator="FlexibleStartWith" PlaceHolderText_L1="Name" InputType="Auto" ColumnSize="2" />
    <Criterion Binding1="MainRecord.Organization" PlaceHolderText_L1="Department" InputType="Auto" ColumnSize="2" />
    <Criterion Binding1="PresenceState" InputType="ComboboxMultiSelection" ColumnSize="2" DefaultValue="-101;-102" Operator="Equal" />
    <Criterion Binding1="MainRecord.Site" PlaceHolderText_L1="Site" InputType="Auto" ColumnSize="2" IsVisibleInAdvancedView="true" />
    <Criterion Binding1="MainRecord.Subsidiary" PlaceHolderText_L1="Subsidiary" InputType="Auto" ColumnSize="2" IsVisibleInAdvancedView="true" />
    <Criterion Binding1="MainRecord.Title" PlaceHolderText_L1="Title" InputType="Auto" ColumnSize="2" IsVisibleInAdvancedView="true" />
  </SearchBar>

Result:

Regards

Hazem