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 / Detail screen from an ...
Power Apps
Unanswered

Detail screen from an item of a Grouped Gallery

(0) ShareShare
ReportReport
Posted on by 4

I've built a Powerapps App from a very simple excel file (MyData) with 3 columns (A,B, C).

 

Now I've 3 screens from the template: Browse, Detail, Edit. In the Browse screen, I've added a new Gallery grouping the original MyData by column "A" GroupBy(MyData;"A";"GroupedData"). Then I added a Nested SubGallery ("GroupedGallery") with single items from Mydata (ThisItem.GroupedData). In this Subgallery, I have a right arrow and I'd like to point to Detail Screen So I added a second Detail screen (Detail2), In the right arrow property I've changed the OnSelct Property to "Navigate(Detail2)".

 

I've tried many things on the Detail2 screen but I couldn't manage to have the details of the selected item.

Among those, on the Item Property I tried to write "GroupedGallery.Selected".

Do you have any suggestions?

Thanks

Categories:
  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lmonno 

    Set your Items property of the nested gallery to: 

    AddColumns(ThisItem.GroupedData, "A", ThisItem.A)

    Then in your nested gallery icon, the OnSelect is:  Set(glbCurrentRecord, ThisItem); Navigate(Detail2)

    Set the Item property of the form in your Detail screen to: glbCurrentRecord

     

    I hope this is helpful for you.

     

    EDIT: Corrected Items property formula above.

  • lmonno Profile Picture
    4 on at

    Thank you  @RandyHayes.

    I managed to follow your instructions until the last passage.

    On the DataSource Property I have still the [@MyData]. Is it correct?

    When I try To write  glbCurrentRecord  on the Item I get an Error.

    It says the value is not compatible with the Datasource 

     

    lmonno_0-1645814923929.png

     

     

  • RandyHayes Profile Picture
    76,299 Super User 2024 Season 1 on at

    @lmonno 

    Yes, your datasource will remain as is for the form.

    The record in the glbCurrentRecord MUST match the schema of the datasource records.

     

    Is your grouping ONLY as you mentioned in your first post, or are you shaping the record in any other way (i.e. grouping at another level, adding columns (beside the one mentioned), etc.)?

     

    Ideally you could work around this by doing a lookup on the datasource for the unique record, but since you are using Excel, that is a bit problematic to get the exact record.

  • lmonno Profile Picture
    4 on at

    Thanks @RandyHayes.

    I think I understand where the problem is. My data source table in the real-life application is a table in the dataverse and I was grouping by a column with a prefix (e.g. crb18_date). When I tried to follow your instructions 

     

    AddColumns(ThisItem.GroupedData, "crb18_date", ThisItem.crb18_date)

     

     I got an error saying that a column with that name already existed. So I tried a different name:

    AddColumns(ThisItem.GroupedData, "A", ThisItem.crb18_date).

    But then I received the incompatible error in the detail screen.

    So why I get this error the already exist error? From what I learned the groupby function create a list of table without the column you are grouping by.

    How can I solve this?

    Thanks again

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 397 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 354

#3
WarrenBelz Profile Picture

WarrenBelz 232 Most Valuable Professional

Last 30 days Overall leaderboard