So this has been driving me bonkers all day and I'm ready to rip my hair out. (Please keep in mind that I'm very new to Power Apps and Dataverse).
I'm playing with a new Power App that I've created. I have a list of reports that people could subscribe to in our organisation, the AAD User table for the users in the organisation, and a joining table ('ReportSubscriptions') between them to create many-to-many listing of people subscribing to reports. My joining table includes
- "UserName' - a lookup to the ADD User table; and
- "ReportSubscribed" - the lookup to the report listing
- Whether their request for subscription is pending or not (Y/N)
On my screen I've created a Gallery with the data source being the joining table. I'm having 2 issues with it.
- I can use syntax like ThisItem.UserName.Mail to get the subscribers email address no problem - I get my 3 test records listed - and ThisItem.'Request Pending' to get the status of their request in the join table (also no problem, still 3 test records). But as soon as I change the Text to ThisItem.ReportSubscribed.'Report Name' (or any field from the Report list table), the names of the reports all flash on the screen briefly and then they're gone. All records seem to disappear and the record selector disappears (which is why I think it has returned no records as opposed to the data being blank). I can't figure this out, and I've used exactly the same syntax as I did for the AAD User table lookup. There is definitely data and all 3 test records have 'Report Name' filled in.
- I also can't get this Gallery to filter to the current user by matching the email address in ReportSubscriptions. I have another Gallery set to the AAD Users table, and have set Items to "Filter('AAD Users',Mail=varUserEmail)" to filter to the current user (where varUserEmail is defined in OnStart as Set(varUserEmail, User().Email);). That works fine.
However, when I try the same thing with the joining table, it doesn't work - again, no records. I've used "Filter(ReportSubscriptions,UserName.Mail=varUserEmail)", and a whole lot of variations on this to try to get it to work, but it just doesn't want to cooprerate.
Any advice would be very much appreciated.