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 / Creating Details scree...
Power Apps
Answered

Creating Details screen based on subgallery

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi everyone, 

 

I am creating a PowerApp for inventory management especially for clothes.

For each size there is an item in my SharePoint list. So, I created a Gallery witch groupes the clothes by their category and in the sub gallery the user will see the different sizes

But now I can’t figure out how to create a form/ detail screen for the selected Item of the Sub gallery so I can build something like a shopping cart.  

In an another Tread I found this:

"Set the context variable to be the unique identifier of the selected item in your subgallery - this would be something like:

Navigate(scnViewOrderHeader, ScreenTransition.Fade, {varOrderHeaderID:ThisItem.OrderHeaderID})

 

Then in the Item property of your form, you can enter an expression which gets the record you want to display by using First and Filtering on the Context Variable, like this:

First(Filter('[Order].[OrderSummary]', OrderHeaderID = varOrderHeaderID))"

 

But this does not work. In the first part the OrderHeaderID is the column which were used to group the Items. In my case the column I used to group my Items is not accepted and underlined in red.

 

I would be great if someone have an idea, I need to finish the project in the next few days and I dont know how.

 

Best regards 

 

Josef 

 

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at

    Hi @Anonymous ,

    All of that should be able to be done.

    From your description, you have one SharePoint list with items (you will need to change these to your names)

    ItemNameCategory and Size.

    You have a sub-gallery which selects the ItemName and Category and presents the different sizes for that item.

    I assume the filter for the second Gallery (I have used ListGallery1 and ListGallery2) would be something like

    Filter(
     YourSPListName,
     ItemName = ListGallery1.Selected.ItemName
    )

    The Item property of the view form would simply be 

    ListGallery2.Selected

    Please tell me if this properly describes your requirements.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz

    I use Powerapps since few weeks and I do not realy understand your answer. I am also not sure if my description was good enough. In the appendix I send a Screenshot of my Sharepoint list and of my App.

     

    “You have a sub-gallery which selects the ItemName and Category and presents the different sizes for that item.”

     

    I have a Main Gallery which groups the Category which is the very same as the ItemName (I know makes no sense, this is just for testing, later on I have to rebuild the data anyway) and the Sub gallery shows the different sizes of the Item.

    And the Form should show the details.

    Thank your for answeringTESTAPP.pngSharepoint liste.png

  • WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at

    Ok @Anonymous ,

    You have a nested gallery - this makes it easier as you already have coded this. I was simply trying to establish the structure which I had not seen until now.

    I will use these names in blue - you will have to change to your names.

    If you want a details form on a new screen, the new Screen is DetailsScreen, the Form DetailsForm and the sub-gallery GallerySub and your List Warenbestand (as per your screenshot)

    So on the OnSelect of the GallerySub

    Navigate(DetailsScreen)

     Create a new View form (DetailsForm) with the following

    DataSource

    Warenbestand

    If you select this from the menu at the far right of the screen, it will auto-populate the fields

    Set the Item to

    GallerySub.Selected

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hello @WarrenBelz

    this exactly what I tried in the beginning. 
    Set the button on Navigate to the details screen. And create a View Form with the same Data source by using the menu right (blue). But it does not auto-populate the fields, not sure what I made wrong. 

    Inkeddatasource.jpg

    Than I set Item to Gallerysub.selected. 

    Item.png

     

    So I selected same Field, but they don’t have any values. 

    no value.png

    I hope you don’t give up hope on me and see my mistake.

  • WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at

    OK @Anonymous ,

    I am not sure why the auto-populate did not work, but you can easily edit and add fields.

    Did you have something selected in the gallery and are the Items of this gallery definitely based on 'Warenbestand Test2'?

    Also to prove there is data (you cannot leave this there - it is only  test) put the Items to First('Warenbestand Test2')

     

     

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz  
    when I add fields, it just show me the label and no Data 
    If you mean by "Did you have something selected in the gallery"  that I select an Item while the app runs, yes I tried this already. 
    Yes the Data based on Warenbestand Test2 and when I put the Items to First('Warenbestand Test2'), data is shown. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @WarrenBelz 

     

    Is this corret ? 

    Gallery1, Item: GroupBy(Filter('Warenbestand Test2'; TextInput3_11.Text in'Artikel Bez.');"Artikel_x0020_Bez_x002e_"; "Artikel2")

    and 
    Gallery2, Item: thisItem.Artikel2 


    Warenbestand Tast2 = Datasource 
    TextInput3_11 = Label with name of the category
    Artikel Bez. = column I used for grouping 
    Artikel2 = Name of the Groupe in Powerapps 

    Would you use another Funktion? 

    thanks for helping. 

  • WarrenBelz Profile Picture
    154,496 Most Valuable Professional on at

    OK @Anonymous ,

    The issue here is that a GroupBy filter in a gallery does not return a single record, but rather a summation of a group of records and this cannot possibly be displayed in a form as it needs to know what single record has to be displayed.

    You need a gallery that displays the single records 

    Filter(
     'Warenbestand Test2'; TextInput3_11.Text in'Artikel Bez.'
    )

    and then Gallery1.Selected  will show the item in a form or this could be the filter for Gallery2 and the form selected from this.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hallo @WarrenBelz,

     

    The Filterfunction dose not work, because I would lose the structure. 

    I solved the problem like this.

    1. Creat a Collection base on the nasted Gallery: ClearCollect( "NewCollection"; thisItem) 
    2. Creat new Screen with a Gallery ("Gallery1") based on "NewCollection" :  item: "NewCollection"   and for the Labels text:
        thisItem."name".  Screen 2 will never not displayed to the App user
    3. Creating my own ViewForm by using TextIputs and Labels, for the TextInputs: Default: "Gallery1".selected."name 

    Thank u Warren for supporting me. I realy appreciate that. 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard