Skip to main content

Notifications

Power Pages - Power Apps Portals
Unanswered

Fuzzy search in portal (on lookup)

Posted on 25 Nov 2024 15:44:41 by
Hi all,

Have a business requirement to 'fuzzy' search a column.  A simple solution that would work for us is to automatically append/prepend wildcares like so `*searchterm*`.

I haven't been able to find a good/clean solution for this.  It appears that some of the solutions that are available in the model-driven apps are not available for portals?

Hope to hear your best practice!

Thanks
Categories:
  • SwatiSTW Profile Picture
    SwatiSTW 157 on 26 Nov 2024 at 04:56:17
    Fuzzy search in portal (on lookup)
    fetch xml query is below
     
    <fetch>
        <entity name="account">
            <filter>
                <condition attribute="name" operator="like" value="%searchterm%" />
            </filter>
        </entity>
    </fetch>
     
  • SwatiSTW Profile Picture
    SwatiSTW 157 on 26 Nov 2024 at 04:55:29
    Fuzzy search in portal (on lookup)

    To create a fuzzy search on a lookup in Power Pages:
     
    Use a Dataverse table. Enable wildcards in your search using the like operator. Update the page dynamically with results using JavaScript.
     
    Steps:
    1. Create a FetchXML query in Dataverse:
     
    2. Use a custom web API to expose this query. Ensure it accepts a search term as input.

    3. Add JavaScript to your Power Pages site to call this API when the user types in the lookup field:
     
    4. Test the lookup by typing in the field and confirming it dynamically updates with partial matches.
     
    5. Ensure proper security settings on your Dataverse table and API permissions.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,246

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,884

Leaderboard