Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Suggested answer

Update Items property of Gallery on Selection of gallery Item to auto-Update Gallery on same Screen

(2) ShareShare
ReportReport
Posted on by 195
Is there any way to update the "Items" property of a Gallery, to kind of perform async on the Gallery without navigating to new screen
 
Items= [Category_Name:"C1", Category_Name:"C2", Category_Name:"C3"]
 
So if I could do something like:
 
Items= If(Gallery.Selected.Category_Name<>"C1",
    [Category_Name:"sub1_C1", Category_Name:"sub2_C1"],
    [Category_Name:"C1", Category_Name:"C2", Category_Name:"C3"]
)
 
But it is not possible... Please suggest work around to get this done. Thanks!
  • Suggested answer
    narayan225 Profile Picture
    2,449 Super User 2025 Season 1 on at
    Update Items property of Gallery on Selection of gallery Item to auto-Update Gallery on same Screen
    I am not sure what you are trying to do but you can do this using a collection.
    I have done the following:
    1. OnStart property of the app:
    ClearCollect(colMainGalData,{Category_Name:"C1"}, {Category_Name:"C2"}, {Category_Name:"C3"})
    2. Items property of the galler:
    colMainGalData
    3. OnSelect property of the gallery:
    If(Gallery1.Selected.Category_Name<>"C1",ClearCollect(colMainGalData,{Category_Name:"sub1_C1"}, {Category_Name:"sub2_C1"}),ClearCollect(colMainGalData,{Category_Name:"C1"}, {Category_Name:"C2"},{Category_Name:"C3"}))
    It works like:
    And then:
     
    Hope this helps.
    Cheers!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard