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 display values ...
Power Pages
Unanswered

How to display values of many to many relationship to the table?

(0) ShareShare
ReportReport
Posted on by 56

Hello, 

 

I have "Contact" table and "Web Role" table (which is adx_webrole) having many:many relationship. On Contact table list view, I want to display the value of Web Role appropriately. I searched in the list of Contact table columns but no sight of "Web Role" I need. 

 

Hannz_0-1698821759123.png

 

So how to get this value and display it?

 

Many thank,

@ragavanrajan  @Lucas001 @EmadBeshai

 

 

Categories:
I have the same question (0)
  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @Hannz ,

     

    You can find it already exist at the Power Pages Management model driven app.

     

    Please select the contacts from the left navigation menu and switch the contact form to be Portal contact (Enhanced) as shown below then scroll down where you can find the web roles sub-grid.

     

    EmadBeshai_1-1698677608236.png

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up.

     

  • Hannz Profile Picture
    56 on at

    Thank you for responding, @EmadBeshai 

     

    I was able to access the "Portal Management" (my model is classic, not enhanced) and see the Web Role as your instruction.  But I want to pull these data and display them to a Power Page webpage.

     

    Let say I have a webpage that only admin can access. In that page, the admin can see a list of contacts, and on each row, there will be a column that show which web role this contact has been given/assigned.

     

    Is this possible?

     

     

     

  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @Hannz ,

     

    The relationship between the contact and web-role entity is N:N relationship not a 1:N or N:1 so you will not be able to find it as column but the only way is to add it as sub-grid.

     

    If you want, you can add sub-grid for the Web Role on the contact form same as that one OOB form.

     

    Also you can add N:N PCF same as this one https://pcf.gallery/nndropdown/ but the issue will be if you want to add this PCF to view as it is not supported.

     

    Please let me know if you need any assistance for any of the above suggestions.

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up.

  • Hannz Profile Picture
    56 on at

    Thank you @EmadBeshai ,

     

    So I understand that there isn't official solution for this kind of trivial problem. But is that possible if I can make use of Liquid to do that? Like getting the pair of keys (key of `adx_webrole` and `contact`) in the relationship table (adx_webrole_contact), comparing and matching with the contact data via javascript before putting the data on displaying table ...

     

    Hannz_0-1698892845027.png

     

    Can you give me some suggestions on that idea?

     

     

     

  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @Hannz ,

     

    Yes, it is double by using liquid and some JS.

     

    To give accurate answer with a sample please provide a sketch for how you want to present your data at the table.

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up.

  • Hannz Profile Picture
    56 on at

    Hi @EmadBeshai ,

     

    I think in table it should be displayed just like other normal tables.

    Hannz_0-1698913810068.png

    And when I want to set the Web Role for a Contact, I go to the Edit page end select 1 or more item (because it is N:N relationship).

    Hannz_1-1698914049781.png

    After submitting the Edit form, the web role(s) should be assigned/given to the Contact and the update should be displayed on the table above.

    Thank you!

  • EmadBeshai Profile Picture
    806 Moderator on at

    Hi @Hannz ,

     

    Now that much clear thank you for that.

     

    I have a suggestion and will list it in details below,

     

    You can create multiselect optionset contains options same as your web-roles and create another flow to check the select values from your multiselect optionset and based on the select value it will do association or de-association in case of remove any web-role.

     

    Also I will recommend to register this flow as webhook to be real time and invalidate the Power Page caching.

     

    By this way you will be able to add the multiselect web-roles to your Edit form and your sub-grid normally.

     

    If this post helps you with your problem, please mark this answer as Accepted Solution.
    If you like my response, please give it a Thumbs Up.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 47 Super User 2026 Season 1

#2
sannavajjala87 Profile Picture

sannavajjala87 16 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 14 Super User 2026 Season 2

Last 30 days Overall leaderboard