Hello Power Apps Community,
I would like some help please.
I've created two CDS entities: "Level" and "Measure". It's a "Many-to-Many" relationship.
I have a simple canvas app.
On screen 1 is a gallery of all the records for "Levels". I have a "Next Arrow" icon against every "Level" record.
When I select a specific "Level" record, it navigates to screen 2.
On screen 2 I wish to have a gallery of all the "Measure" records for the selected "Level" record.
So, my question is how can I show all the "Measure" records for the selected "Level" record?
I can't find out how to do this and think it's due to the Many-to-Many relationship. At a One-to-Many relationship I've been able to achieve this by using a filter with different entities.
Any help would be greatly appreciated.
Solved! Go to Solution.
I assume you're using the out-of-the-box CDS many to many relationship type? Haven't tried it myself but in your expression, can your try by navigating with the relationship name or relationship entity name? For ex:
Thanks so much for the reply. I hope all is well.
You are correct, I'm using the out-of-the-box relationships for CDS.
I tried your suggestion, but wasn't able to get it working, it might be my lack of understanding of canvas app functions/formulas etc. So I've raised a ticket to Microsoft. When I hear back from them, I'll post it here.
A question relating to this, do you know of anyone who has a great blog/YouTube channel that focuses on building canvas apps with CDS? If so, if you could provide me with the details that would be great. Now that Data Flex is coming I need to focus on canvas apps more. Haha.
Like always, thanks for your help,
Thanks for the message. It's over a year since I last looked at this, so had to remind myself what I was doing. And I've deleted the app I was creating. From the Microsoft post look at where it begins "Many-to-Many Relationships".
I quickly built a basic app and tried it out, and I was able to click on a record in my "Level" table and only see the records associated to it from my "Measures" table in another gallery. See below.
I created a screen with a gallery and pointed at my Level table.
It shows all Level records in Dataverse.
For the chevron icon at the end of each record I set the OnSelect property as
Select(Parent); Navigate('Screen Measure')
When I click the chevron icon I want to be taken to a second screen that shows all the "Measure" records associated with the selected "Level" record.
To do this I created a second screen with a gallery.
In the gallery's "Items" property I set it to:
(If I was going to explain, poorly, the expression above; it is saying for the gallery with all the Level records, for the Level record you selected in that gallery, find all the Measure records related to it... But that might be a completely wrong description of what it is actually doing, but that's how I say it to myself.)
It then shows me only the Measure records associated with that Level record I selected on the previous screen.
In the screenshots above I selected the "Level 1" record and got two Measure records associated with it "Measure AA" and "Measure BB".
As another example, look at the below. I select the "Level 2" record.
And now get different Measures, "Measure CC", "Measure DD", "Measure EE".
Hope that makes sense?
Canvas apps are not my speciality unfortunately. I'm sure there is a better more elegant way of doing this.
Let me know how you get on. Good luck!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us for the next call on June 15, 2022 at 8am PDT.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.