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 / How to Switch Entity L...
Power Pages
Answered

How to Switch Entity List in Power Portal Page.

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

I am very new to Portal, I have 1 requirement is .

I have one Lookup Set that contains different entity List Name .
Like - 
Entity List 1
Entity List 2
Entity List 3
Entity List 4

So suppose
if select the Entity Set 1 Option from Lookup set then i need to display "Entity List 1"

like the Same.
if select the Entity Set 2 Option from Lookup set then i need to display "Entity List 2".

i tried so hard but no luck. if Any one please help me for the same.

Thanks in advance.

Categories:
I have the same question (0)
  • Verified answer
    OOlashyn Profile Picture
    3,498 Most Valuable Professional on at

    Hi @VijuDPMSD ,

    Your requirement is doable, but you would need to create a custom web template and use liquid for that. If you don't know what liquid is check this official doc - https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/liquid-overview. Because liquid renders on the server side what you need to do is after user selects an option from your list you need to reload a page passing selected option into the URL and then when page renders read that option and select applicable entity list based on that option. Below you can find simplified code version of this approach:

    {% comment %} Get optionId from request URL {% endcomment %}
    {% assign optionId = request.params['optionId '] %}
    
    
    <div class="container">
     <div class="select-container">
     {% comment %} set current page location to value of selected option {% endcomment %}
     {% comment %} when selected page will be reloaded with proper parameter in url {% endcomment %}
     <select onchange="location=this.value;">
     <option value="{{page.url}}" selected></option>
     {% comment %} Value is combination of current page url and custom parameter {% endcomment %}
     <option value="{{page.url}}?optionId=option1">Option 1</option>
     <option value="{{page.url}}?optionId=option2">Option 2</option>
     <option value="{{page.url}}?optionId=option3">Option 3</option>
     </select>
     </div>
     <div class="entitylist-container">
     {% comment %} Show proper entitylisy by selected id or default message {% endcomment %}
     {% case optionId%}
     {% when 'option1' %}
     {% entitylist name:First List %}
     {% when 'option2' %}
     {% entitylist name:Second List %}
     {% when 'option3' %}
     {% entitylist name:Third List %}
     {% else %}
     <div>No option selected!</div>
     {% endcase %}
     </div>
    </div>

    To find more about entity list liquid tag see here - (https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/portals-entity-tags#entitylist) and here - (https://docs.microsoft.com/en-us/powerapps/maker/portals/liquid/render-entity-list-current-page).

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 64

#2
DP_Prabh Profile Picture

DP_Prabh 34

#3
oliver.rodrigues Profile Picture

oliver.rodrigues 30 Most Valuable Professional

Last 30 days Overall leaderboard