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 / moving to 2nd gallery ...
Power Apps
Unanswered

moving to 2nd gallery from previous gallery not showing the selected record

(0) ShareShare
ReportReport
Posted on by 76

Hi everyone!

I have a gallery loaded and want to select a record from the Gallery and move it to another form's gallery, however it is not selecting the correct record.

see attached document - CDS connection

Thanks

Sigi

 

Categories:
I have the same question (0)
  • PowerAddict Profile Picture
    7,316 Most Valuable Professional on at

    Hi Sigi, 

     

    Is the 2nd gallery a gallery of related records of the account selected in the 1st gallery? If so, how are you filtering the 2nd gallery? In other words, how are you referencing the 1st gallery while filtering the 2nd gallery? Are you using something like Gallery1.Selected?

     

    Thanks!

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @shawkinson ,

     

    Can you share more details with your apps? which formula do you use to move the selected record to another gallery? Are two galleries from the same data source?

     

    I have made a test on my side, just set Table(FirstGallery.Selected) to Items property of the second gallery.

    Snipaste_2019-11-08_15-29-56.png

    Please have a try and check if your issue is fixed.

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

  • shawkinson Profile Picture
    76 on at

    @v-siky-msft 

    Thank you that worked - If I want that Gallery  to be loaded from multiple other galleries, how would I accomplish that? - I don't want to create a new form with a gallery for each selected previous gallery.

    Thanks,

    Sigi

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @shawkinson ,

     

    All gallery items should come from the same data source.

    If the data sources of multiple other galleries are different from each other, there is no way to load them in a combined Gallery.

    If their data sources are the same, Set the each gallery selected record to be a variable: Set(var_Gallery1,Gallery1.Selected), use set the Items property of the combined Gallery to [var_Gallery1, var_Gallery2, var_Gallery3,..], and set the field to ThisItem.Value.'Field Name'.

    Snipaste_2019-11-12_09-36-22.png

    Best regards,

    Sik

    If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.

     

  • shawkinson Profile Picture
    76 on at

    @v-siky-msft 

    Thanks for your reply - Maybe I am not understanding the answer - see attached document with 4 screenshots on what I would like to do. Also, where would I attached the code to accomplish that

    Thanks

    Sigi

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @shawkinson ,

     

    I am not sure if you want to select one item from any of three galleries and display the one in another gallery, or if you want to select items from all three galleries and display the items in another gallery.

    If you only want to select and display one items of these three gallery:

    1. Set "Set(var_SelectedItem, Gallery1.Selected)" to OnSelect of Gallery1

    2. Set "Set(var_SelectedItem, Gallery2.Selected)" to OnSelect of Gallery2 

    3. Set "Set(var_SelectedItem, Gallery3.Selected)" to OnSelect of Gallery3

    4. Set var_SelectedItem to Items property to the final gallery to show the selected item.

    5. The field of gallery is like ThisItem.Value.FieldName

     

    If you want to select and display three items of three galleries:

    1. Set "Set(var_SelectedItem1, Gallery1.Selected)" to OnSelect of Gallery1

    2. Set "Set(var_SelectedItem2, Gallery2.Selected)" to OnSelect of Gallery2 

    3. Set "Set(var_SelectedItem3, Gallery3.Selected)" to OnSelect of Gallery3

    4. Set [var_SelectedItem1,var_SelectedItem2 ,var_SelectedItem3] to Items property to the final gallery to show the selected items.

    5. The field of gallery is like ThisItem.Value.FieldName

    Best regards,

    Sik

  • shawkinson Profile Picture
    76 on at

    The option below is what I would like to use - However, when changing the properties of the first gallery to move to the final gallery, it does not do anything onSelect.

    Any idea's why that would be?

    See attached screenshots - I am not getting any errors on the formulas

    Thanks,

    Sigi

     

     

    I am not sure if you want to select one item from any of three galleries and display the one in another gallery, or if you want to select items from all three galleries and display the items in another gallery.

    If you only want to select and display one items of these three gallery:

    1. Set "Set(var_SelectedItem, Gallery1.Selected)" to OnSelect of Gallery1

    2. Set "Set(var_SelectedItem, Gallery2.Selected)" to OnSelect of Gallery2 

    3. Set "Set(var_SelectedItem, Gallery3.Selected)" to OnSelect of Gallery3

    4. Set var_SelectedItem to Items property to the final gallery to show the selected item.

    5. The field of gallery is like ThisItem.Value.FieldName

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @shawkinson ,

     

    In my test, the codes work well, the only difference is that you gallery is in the Data Card.

    Could you try to get the gallery out of the Data card and try again?

    StoG_5.gif

    Best regards,

    Sik

  • shawkinson Profile Picture
    76 on at

    I have created a new Screen without the gallery being in a data card. - However when I click on it it will not open up the next form - does nothing

    See attached

    Sigi

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @shawkinson ,

     

    Do you mean you want to navigate to the 2nd gallery when select the item?

    Sorry for my negligence.

    You need to add Navigate(CreateActivities,ScreenTransition.None) after the Set() formula of each OnSelect property. 

    Please take reference:

    1. Set  "Set(var_SelectedItem, Gallery1.Selected); Navigate(CreateActivities,ScreenTransition.None)" to OnSelect of Gallery1

    2. Set  "Set(var_SelectedItem, Gallery2.Selected); Navigate(CreateActivities,ScreenTransition.None)" to OnSelect of Gallery2 

    3. Set  "Set(var_SelectedItem, Gallery3.Selected); Navigate(CreateActivities,ScreenTransition.None)" to OnSelect of Gallery3

    4. Set var_SelectedItem to Items property to the final gallery to show the selected item.

    Best regards,

    Sik

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard