
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.
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).