In this article, lets learn how to configure global search in ‘Power Apps Portals’.

What is Global Search in Portals:

  • Global search of portals allows you to search for records across multiple entities.
  • Allows you to search across multiple columns and configure what columns of an entity would be searchable.
  • By default, few OOB portal entities are enabled for Global Search. To name a few ‘Knowledge Article, Blog, Blog Post, Forum, etc…’.

So lets see how to configure global search for other entities. I am taking ‘Account’ entity for this article and you can pick the entity of your choice.

Prerequisites:

  • PowerApps account. Refer here to get an account.
  • PowerApps Portal. Refer link for steps to enable portal.

Once you fulfill the Prerequisites, you would get the following two Apps in your PowerApps maker portal.

  • ‘Portal Management’ – Model-driven App which contain Portal related entities.
  • ‘Portal’ – Portal app. I named my Portal App as ‘ExpMay2020’.

GS_1

Following are the high level steps to enable global search for ‘Account’ entity.

  • Add/Update Portal ‘Site Settings’.
  • Create a ‘Portal Search’ view in Account entity
  • Add Portal ‘Web Page’ to display the search result.
  • Add ‘Site Marker’ for the ‘Web Page’
  • Grant permissions to Portal Users
  • Rebuild Search Index

Lets get started.

Add/Update Portal ‘Site Settings’:

  • Open the ‘Portal Management’ Model-driven App.
  • Go to ‘Site Settings’ and Add a new ‘Site Setting’ by Name ‘Search/EnableAdditionalEntities’ and  Value ‘true’.
    • Note: Name should be exact match. If you already have ‘Search/EnableAdditionalEntities’ site setting, make sure the Value is set to ‘true’.

GS_2

  • Also make sure the OOB Site Setting ‘Search/Enabled‘ is set to ‘true’.
  • Add a new site setting ‘search/filters’, if not exists already. Open the record, if already exists.

GS_3

  • Set the Value with following pattern {YourDesiredName:EntityLogicalname}.
  • In my case, its ‘Accounts:account‘.
    • Multiple entities must be separated by Comma(,) (i.e., Accounts:account,Contacts:contact)

GS_4

Create a ‘Portal Search’ view in Account entity:

Open the Solution and go to ‘Account’ entity.

  • Create a new View by name ‘Portal Search‘.

GS_5

  • Add the columns which you want to search to the view.

GS_6

  • Save & Publish.
  • Once saved, view shows as below.

GS_7

Add Portal ‘Web Page’ to display the search result:

To open and display the Account record from ‘Global Search’, we need a new ‘Web Page’ with ‘Account’ Entity Form.

  • Create a new ‘Entity Form’ by selecting ‘Account’ entity and map one of the Account form. I’ve named my ‘Entity Form’ as ‘Account’.

GS_21

  • Create a new blank ‘Web Page’.

GS_8

  • Add a ‘Form’ component to the ‘Web Page’ and map the ‘Account’ entity form created in previous step.

GS_22

Add ‘Site Marker’ for the ‘Web Page’:

  • From the ‘Portal Management’ Model-driven App go to ‘Site Markers’.
  • Create a new ‘Site Marker’
    • Name : {EntityName_SearchResultPage}. In my case, its ‘account_SearchResultPage’.
    • Page: Web Page which we created in previous section.

GS_18

Grant permissions to Portal Users:

Portal User must have a minimum ‘Global’ Read access on the entity you are configuring global search for. In my case it’s ‘Account’ entity.

  • Create a new ‘Entity Permission’ as below.

GS_13

  • Create a new ‘Web Role’ and map the ‘Entity Permission’.

GS_14

  • Grant the ‘Web Role’ to the ‘Portal User’.

GS_16

Rebuild Search Index:

We left with one last step before we test the Global Search. Its ‘Rebuild Search Index’

  • Connect to your portal. Navigate to ‘../_Services/about’ page.
  • Click ‘Rebuild search index’.

GS_12

Test the Global Search:

  • Connect to your Portal.
  • Click on ‘Magnifier’ symbol from the ribbon and type your Account to Search.
    • Note: You can Search only the columns available in your ‘Portal Search’ view added on ‘Account’ entity.

GS_23

  • You would get the matching Accounts as below.

GS_19

  • Click on the one of the Accounts link and you would be redirected to that ‘Account’.

GS_20

Note:

  • Refer this PG’s article for more details.
  • To remove the entity from Global Search refer this article.

🙂

 

 

 

Advertisements
Advertisements

10 responses to “[Step by Step] Power Apps Portal – Configure Global Search”

  1. Power Apps Portal – Disable Global Search of an Entity | Rajeev Pentyala - Dynamics 365 Blog Avatar

    […] you are not familiar with Portal ‘Global Search’, please refer my other article to learn the steps to configure global search for an […]

  2. DJ Avatar
    DJ

    anyone get this to work with Cases/incidents ?

    I did all the steps. The is at least one case/incident that is resolved with Publish to Web checked in CDS.

    I keep getting ‘No results were found for this query’

    Does this error mean it actually searched the table/entity? The string I am searching for is in the Title/Summary.

    1. Rajeev Pentyala Avatar

      Can you make sure the Entity Permissions properly configured?

  3. Sri Avatar
    Sri

    Thanks alot Rajeev for the great article

  4. Sukhada Athavale Avatar
    Sukhada Athavale

    Hi Rajeev,

    I have followed the steps to enable search for Account Entity as given above. I got stuck at “Rebuild Search Index” Page. I am not able to see the Details and tool. I can only see Portal and its ID.

    Can you suggest any other way to “Rebuild Search Index” ?

    Thanks.

    1. Rajeev Pentyala Avatar

      You should be a ‘Portal Administrator’. Follow the steps documented in this article : https://rajeevpentyala.com/2018/04/03/dynamics-portal-caching-issue-missing-clear-cache-button/

  5. Nagalatha N V Avatar
    Nagalatha N V

    Hi Rajeev,
    I have issues with modified date functionality.
    can you help me by sharing document related to this topic

  6. Jiss Jomon Avatar
    Jiss Jomon

    I Connect to the portal ‘../_Services/about’ page but it not shows the rebuild search index

    1. Rajeev Pentyala Avatar

      Please make sure you have this web role ‘Portal Administrator’

  7. Shruthi Avatar
    Shruthi

    How can we enable global search for OOB entitites like Knowledge articles?

Leave a reply to Power Apps Portal – Disable Global Search of an Entity | Rajeev Pentyala – Dynamics 365 Blog Cancel reply

Visitors

2,092,818 hits

Top Posts