Showing results for 
Search instead for 
Did you mean: 
Level 8

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


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

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"


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?


Thank you,

Community Support Team
Community Support Team

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

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,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Level 8

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

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.

Thank you,
   Sa Wu.

Helpful resources


Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020


Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,773)