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 Apps / Many-to-many relations...
Power Apps
Unanswered

Many-to-many relationship table not working for Items/Collect, CountRows ok though

(0) ShareShare
ReportReport
Posted on by 635

Hello

Please be so kind as to read my full post before responding.
Thank you for your consideration.

In one of my PowerApps, I want to show a Gallery of items of a custom "WelcomeApp Event Config" entity, which is linked to the default systemuser entity via a many-to-many relationship "kk_kk_welcomeapp_userconfig_systemuser", depending on the user who is logged in.
image.png
I have a two other many-to-many relationships between custom entitities which don't cause any problems.
Since this is a pretty recent PowerApp, the relational data feature is turned on by default.
image.png
But with this particular relationship, I don't seem to be able to use the relational table as Items or for Collect.
Both of them only yield an empty (?) table.
CountRows works though.

What happens in my App is that with App.OnStart I have:

Set(userEmail, User().Email);
Set(testCount, CountRows(LookUp([@Benutzer], 'Primäre E-Mail-Adresse'=userEmail).'WelcomeApp Event Configs (kk_kk_welcomeapp_userconfig_systemuser)'));
ClearCollect(testCollect, LookUp([@Benutzer], 'Primäre E-Mail-Adresse'=userEmail).'WelcomeApp Event Configs (kk_kk_welcomeapp_userconfig_systemuser)');

CountRows gives the correct result from the CRM, but Collect of the counted thing yields nothing
image.pngimage.pngimage.png
I've also tried directly using the relational table as Items of a gallery EventConfigsGallery.Items

LookUp([@Benutzer], 'Primäre E-Mail-Adresse'=userEmail).'WelcomeApp Event Configs (kk_kk_welcomeapp_userconfig_systemuser)'

image.png
and set Text of a Label to

CountRows(testCollect) & "/" & testCount & ", " &
CountRows(EventConfigsGallery.AllItems) & "/" &
CountRows(LookUp([@Benutzer], 'Primäre E-Mail-Adresse'=userEmail).'WelcomeApp Event Configs (kk_kk_welcomeapp_userconfig_systemuser)') &
" Events"

yieldingimage.png

This only showcases the same problem I had with App.OnStart.

My questions

  1. How do I get this to work?
  2. What's the problem here?
  3. Am I using the wrong entry from the (below) autocomplete list?
  4. Is there something special about (many-to-many?) relationships to the systemuser entity because there's already a lot of standard relationships to that entity anyway?
    image.pngimage.pngimage.png

 

Thank you,
     Sa.

Categories:
I have the same question (0)
  • v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @SaWu ,

    Could you tell me what is "kk_kk_welcomeapp_userconfig_systemuser" ? a look up field?

    Usually, only in one-to-many relationship, it will generate automatically a lookup field in the "many" entity.

    So, I need more details about your issue.

     

    Best regards,

  • SaWu Profile Picture
    635 on at

    Hi @v-yutliu-msft 

    Please be so kind as to actually read my post.
    My post mentions several times, with screenshots, what that name is for.
    It is not a lookup field.

    And you are wrong about the new relational Data tables.
    They are always appear as a new "fake" field in the one entity for one-to-many relationships.
    The many entity only carries the lookup field but no relational data field.

    Relational data tables/fields are supposed to work for many to many relationships as well.
    In this case the "new" fake field with relational Data appears in both entities.
    https://powerapps.microsoft.com/en-us/blog/option-sets-and-many-to-many-relationships-for-canvas-apps/
    image.png

    Thank you,
       Sa Wu.

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 Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard