Webrole based navigation bar access on Powerapps portals

| Muhammad Yaseen

To show Navigation Bar according to the web role or according to some other condition

First create the Web Links

Add pages in your Web Link according to your need

We will be using the FetchXml to check for the condition and liquid template for the web roles of the current user and assign navigation bar accordingly

Code inside your header page:
{% assign primary_nav = weblinks["Public Users"] %}

{% if user.roles contains 'Captioner'%}

{% fetchxml CapContactLan %}

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">

<entity name="akouo_language">

    <attribute name="akouo_name" />

    <attribute name="createdon" />

    <attribute name="akouo_code" />

    <attribute name="akouo_languageid" />

    <order attribute="akouo_name" descending="false" />

    <link-entity name="akouo_contact_akouo_language" from="akouo_languageid" to="akouo_languageid" visible="false" intersect="true">

    <link-entity name="contact" from="contactid" to="contactid" alias="ab">

        <filter type="and">

        <condition attribute="contactid" operator="eq" uitype="contact" value="{{user.contactid}}" />

        <condition attribute="akouo_interpreteronboarding" operator="eq" value="1" />






{% endfetchxml %}

{% assign CapContactLan_Length = CapContactLan.results.entities %}

{% if CapContactLan_Length.size == 0 %}

{% assign primary_nav = weblinks["Interpreter-Onboarding-Navigation"] %}

{% else %}

{% assign primary_nav = weblinks["Main-Navigation"] %}

{% endif %}

{% elsif user.roles contains 'Project Manager Admin' %}

{% assign primary_nav = weblinks["PMA-Main-Navigation"] %}

{% elsif user.roles contains 'Project Manager' %}

{% assign primary_nav = weblinks["Main-Navigation"] %}

{% endif %}

Join us next time, as we continue our journey of learning canvas apps.Click here to learn more about Imperium's Power Apps Services. We hope this information was useful, and we look forward to sharing more insights into the Power Platform world.

Chief Architect, Founder, and CEO - a Microsoft recognized Power Platform solution architect.

About The Blog

Stay updated with what is happening in the Microsoft Business Applications world and initiatives Imperium is taking to ease digital transformation for customers.

More About Us

We provide guidance and strategic oversight to C-Suite and IT Directors for on-going implementations. Feel free to give us a call.

1 331 250 27 17
Send A Message

Ready to Start?

Get a personalized consultation for your project.

Book a Meeting