This seems like such a simple thing to do, but I seem to have it all wrong. I have a SharePoint list called Newsletter Articles. I have a vertical gallery (called LeftNav) that holds a list of all the articles (just the title and the author) that hangs out as navigation on the side of my Power App.
I have another gallery that I've sized to be huge (called DetailedView), and that gallery holds all the article details - you'll see the article title, author, text there, a video recording, etc. etc. I want to be able to select a newsletter article from the LeftNav gallery, and have the DetailedView gallery show the details for just that article.
Detailed view throws an error with any of these Item specifications:
Filter('Newsletter articles'.ID,LeftNav.Selected.ID)
Filter('Newsletter articles',LeftNav.Selected.ID)
Filter('Newsletter articles',LeftNav.Selected)
Bonus question - what should my Action be for my LeftNav items? I have a feeling I have that written wrong too...
Thank you in advance for any help!
Solved! Go to Solution.
The gallery LeftNav seems fine, but I think the other one shouldn't be a gallery. I may be mistaken, but it sounds like the data shown in DetailedView is all in one record, spread over multiple columns. Galleries work miracles when showing multiple records, but aren't ideal for showing one record only. An edit/display-form seems to be way to go.
It's not that you can't do it the way you did it. You can use the LookUp() function for your DetailedView gallery's Items-property and make sure it only shows one record. It's just not the way galleries are designed.
The LookUp function would be:
LookUp('Newsletter articles', ID = LeftNav.Selected.ID)
- Joeri Blomberg
The gallery LeftNav seems fine, but I think the other one shouldn't be a gallery. I may be mistaken, but it sounds like the data shown in DetailedView is all in one record, spread over multiple columns. Galleries work miracles when showing multiple records, but aren't ideal for showing one record only. An edit/display-form seems to be way to go.
It's not that you can't do it the way you did it. You can use the LookUp() function for your DetailedView gallery's Items-property and make sure it only shows one record. It's just not the way galleries are designed.
The LookUp function would be:
LookUp('Newsletter articles', ID = LeftNav.Selected.ID)
- Joeri Blomberg
@jblomberg Thank you! You absolutely read it right that the DetailedView is data from a single record.
I'm using a gallery because I can't seem to get the sort of layout I'd like to have with a display form: it seems like they insist on a vertical structure that lists the data from top to bottom, and I want to organize data from the columns all around the page. You probably guessed that I'm very new to Power Apps and hacking my way around. And your LookUp function worked - thank you!
User | Count |
---|---|
152 | |
93 | |
84 | |
77 | |
58 |
User | Count |
---|---|
194 | |
174 | |
106 | |
96 | |
89 |