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 / Retain Gallery items o...
Power Apps
Answered

Retain Gallery items on navigation from one screen to another and at the end save all items in a list

(0) ShareShare
ReportReport
Posted on by 45

I have multiple screens app. I have a gallery in my screen two, so i select Item from screen one and Item details are displayed on sccreen two in a gallery one at a time. At the end I want to save all the selected item details in a list.

But now the problem is that every time I select an item, previous item's information disappears. I want to see all selected Items in gallery but I can not find a solution to this. 

Categories:
  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    Hello @zainab1 

    In  gallery 2  put a check box ind in the Oncheck value to save those values in a collection. At the end you will have all the elements that you want to save in a collection. In the onUncheck function you remove that record from the collection.

    If something I have not understood well you comment me.

    If it works for you I would appreciate an answer and lilke

  • zainab1 Profile Picture
    45 on at

    Let me explain this clearly

    1. Screen1 user selects Item to view detail

    2. On clicking button user navigates to screen 2

    3. After viewing detail of item 1 in screen2, user goes back to screen 1 to view another item

    4. When user selects another item from screen 1 and navigates to screen 2

    5.on screen 2, previous item details disapper form gallery and current selected item details appear.

     

    desired behaviour is when user performs 4th and 5th steps, user should be able to see both items previous and current one. this is not happening with check box.

     

    Which funtion I should use to retain all items details in gallery.

  • zainab1 Profile Picture
    45 on at

    I already have a collection for storing all gallery data but I want that user should be able to see all the records in gallery even after navigation between screen 1 and 2.

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    hi @zainab1 

    When doing steps 4 and 5,
    what you want to store to see later what is it,
    - the items of screen 2 that you select
    - all the details of the item on screen 1

    I am not clear on this point.

    In any case the solution is to put the records in an independent collection.

  • zainab1 Profile Picture
    45 on at

    I have put item details in a collection, but I want to show current selected item and previous items in gallery as well.

    gallery(items)= screen1.seleccted, currently im using this formula this shows only currently selected item details

    but I would like to show previous item details as well so can I use Sum(screen1. selected, collection)

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    Hola @zainab1 
    Utilice la función de recopilación para agregar a la colección los elementos a la colección, que al hacer clic en eso agregará a la colección los detalles de esos artículos.

    En la pantalla 2 en lugar de gallery(items)= screen1.seleccted, tendrás que poner el nombre de la colección, y así los obtendrás todos.

    Lo único es que en algún momento querrás limpiar la recopilación de datos.

  • zainab1 Profile Picture
    45 on at

    I am getting error now in display data from the collection that i just applied by following your above sollution

    zainab1_0-1684937950307.png

     

  • Jon Unzueta Profile Picture
    1,836 Super User 2026 Season 1 on at

    Hello @zainab1 
    Ok that's because in the collection you are not saving the data you need, what data are you saving? maybe you need something like this when you collect the data in the collection

    Collect( IceCream, { Flavor: "Pistachio", Quantity: 40 }, { Flavor: "Orange", Quantity: 200 } )

    but with the data you need in your collection and then in those errors put thisItem. "your value".

  • Verified answer
    Federico_Oriani Profile Picture
    60 on at

    Hello zainab1
    Could you please try it this way if you haven't already:

    Federico_Oriani_0-1684938712448.pngFederico_Oriani_1-1684938726309.png

     

    Best Regards,
    Federico

  • zainab1 Profile Picture
    45 on at

    It worked.

    Thanks alot!

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 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 223

Last 30 days Overall leaderboard