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 / Help with a Gallery fi...
Power Apps
Answered

Help with a Gallery filtering

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have 2 galleries called "New" & "Closed"

The New gallery I am filtering by certain codes X & Y by a ClearCollect called ccTest

Items: Filter(ccTest, Code="X" || Code="Y")

 

The Closed Gallery I am filtering by Radio1 button. Yes

Items: Filter(ccTest, Radio1="Yes")

 

In the New gallery if I change the code to another code value and select Yes on the radio1, the case will move over to the Closed gallery. 

 

Sometimes, the code in the New gallery needs to stay the same (x or y) but the radio1 button still gets selected Yes but stays in the New gallery.

My question:

How do I move this code that is a 'X' value, and the radio button gets selected Yes and move into the Closed gallery?

Thank you

Categories:
  • LaurensM Profile Picture
    12,516 Moderator on at

    @Anonymous try the following code for the New Gallery:

     

    Items: Filter(ccTest, (Code="X" && Radio1 <> "Yes") || Code="Y")
    
    If it also can occur for Y try:
    
    Items: Filter(ccTest, Radio1 <> "Yes" && (Code="X" || Code="Y"))

     

    I hope this helped!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @LaurensM 

    Thank you for responding. The information didn't help. 

     

    In the New Gallery working a record. If I leave the Code to either X or Y and then select Yes (Radio1), it will go to the Closed Gallery and also stay in the New gallery because of the filtering of X or Y. 

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Anonymous does the Radio button update the record in the collection when selecting "Yes"?

    If so, you should use this field to filter the New Gallery instead of referencing a radio control:

    New Gallery Items property:
    
    Items: Filter(ccTest, RadioField <> "Yes" && (Code="X" || Code="Y"))
    
    OnChange of RadioButton:
    
    Patch(ccTest, ThisItem, {RadioField: Self.Selected.Value})

     

    I hope this helps!

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @LaurensM 
    Since the New gallery filter is setup to show all Code="X" || Code="Y", it keeps these codes in the New gallery after updating record row as I leave the Code as X or Y. Even though if you look in the Closed Gallery, it shows the record updated there. I won't remove record from the New gallery because its filtering for X or Y code. Would you know how to remove the record from the New gallery after updating it?

     

  • LaurensM Profile Picture
    12,516 Moderator on at

    @Anonymous does this also occur when you extend the filtering with:

    Filter(ccTest, RadioField <> "Yes" && (Code="X" || Code="Y"))

    The gallery will only show records that do not have a "Yes" RadioField and code X or Y.

    Once updating the record to 'Yes', it should disappear from the first gallery due to the filter above.

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

    @LaurensM 
    yes, when I tried the above:

    Filter(ccTest, RadioField <> "Yes" && (Code="X" || Code="Y"))

    It still keeps the X and Y codes in the New gallery even though it shows these records as being closed in the Closed gallery. 
    I know this doesn't make any sense. It's just a simple filtering between the 2 galleries. I honestly don't get it

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @LaurensM 

    Its working now. I got your suggestion above to work. Thank you so much! Thank you for all your help

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

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 395 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 260 Most Valuable Professional

Last 30 days Overall leaderboard