web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / Restrict search based ...
Power Pages
Unanswered

Restrict search based on current page

(0) ShareShare
ReportReport
Posted on by 103

Hi everyone

 

I currently have a Power Pages site setup that allows external users to search a single Dataverse table, which holds property details.  This all works fine using the built-in Dataverse search.

 

The table that is currently setup holds property information for a particular region but we now have plans to expand this functionality to include properties from other regions.  On the site we will have a separate 'landing' page for each region as visitors will normally only be interested in their region.  This also means that I now want to restrict the search based on which page they're searvhing from.

 

So for example if I click a link that takes me to the page on my site for Europe, when I do a search for a property I only want properties in Europe to appear in search results.  If for example there's a similar named property in North America I don't want that to appear.  Is there a way to do this?  I was thinking about having each region as a separate Dataverse table but if I do this I can't see a way of pre-filtering the search on each page in the site to only search the relevant table?

 

Any assistance would be welcomed.

Categories:
I have the same question (0)
  • oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    Hi, can you share a mock-up of what you are trying to achieve?

    it seems to me that all you need is a list + form with subgrid 

  • gjayn84 Profile Picture
    103 on at

    No problem, please see my very basic mockup below:

     

    Current Setup

    At the moment I have a single landing page with a search bar.  There is one Dataverse table on this site and the search/filters site setting:

     

    gjayne1984_0-1674035739018.png

    As there is only one table being searched at the moment I've removed the filter dropdown from the search bar using custom CSS.  I don't want users to have to manually set this filter.

     

    Proposed Setup

    As we now need to add the ability to search for properties in other regions I was thinking of having a landing page that has buttons/links to take users to a separate page for each region:

     

    gjayne1984_1-1674035916497.png

    There would then be a search bar on each page with text and information related to that region:

     

    gjayne1984_2-1674035973009.png

    However, I don't know the best way to restrict the search on each of these region pages.  If possible I would want the filter dropdown to stay hidden but automatically change based on the page the user is on at the time?  I'm open to any other ideas though if that's not possible.

  • oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    Hi, you probably have a table called Regions or something, I would start this by using List component pointing to that table

    Each region should have multiple Properties via 1:N relationship (this should probably be another table), have you designed this in the Dataverse? 

  • gjayn84 Profile Picture
    103 on at

    I did use a list view originally but the search function wasn't the best as you needed to use wildcards and any columns you wanted to search needed to be in the list view, which was a bit cluttered?  I was wondering about using JavaScript to automatically set the Search filter dropdown based on the page the user was on i.e. if the user is on the Europe page the search filter on that page will default to the Europe table, but I'm not sure if that's possible?  This method is also why I was thinking about having individual tables for each region's properties as I assumed it would be easier to break out the search this way?

  • oliver.rodrigues Profile Picture
    9,425 Most Valuable Professional on at

    would this article help with enhancing the search experience?: http://oliverrodrigues365.com/2022/12/14/power-pages-adding-wildcard-on-list-search/

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Pages

#1
Lucas001 Profile Picture

Lucas001 17 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 12

#2
CN-06091549-0 Profile Picture

CN-06091549-0 12

Last 30 days Overall leaderboard