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 / Concatenate multiple R...
Power Apps
Answered

Concatenate multiple RemoveIf actions

(0) ShareShare
ReportReport
Posted on by 362

Objective: I am trying to remove lines from a collections based on values in dropdowns in order to filter a gallery based on that collection.

 

Process: select options in different dropdowns than click on a button which OnSelect action is to remove lines from the collection and return a filtered gallery; the action in the button OnSelect is

 

RemoveIf(colFilteredSOR,!(Dropdown_FilterProjectType.SelectedText.Value in 'Project Type'));

RemoveIf(colFilteredSOR,!(Dropdown_FilterCountry.SelectedText.Value in Country));

etc...

 

Problem: the button works correctly if there is only one RemoveIf action, and returns zero items in the gallery (wrong result) if there are more.

 

I suspect there is an error in the syntax used for the OnSelect action of the button.

 

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

    Hi @Gilmour,

     

    Is there a specific reason why you are not just using the Filter() function instead of removing items from a collection? The Items property of your gallery could just be:

     

    Filter(
     colFilteredSOR,
     IsBlank(Dropdown_FilterProjectType.SelectedText.Value) || Dropdown_FilterProjectType.SelectedText.Value in 'Project Type',
     IsBlank(Dropdown_FilterCountry.SelectedText.Value) || Dropdown_FilterCountry.SelectedText.Value in Country
    )

    The filtering would happen instantly without the need of a button.

     

    Should the RemoveIf be necessary, would it be possible to to try the code below:

    RemoveIf(
     colFilteredSOR, 
     !IsBlank(Dropdown_FilterProjectType.SelectedText.Value) && !(Dropdown_FilterProjectType.SelectedText.Value in 'Project Type') ||
     !IsBlank(Dropdown_FilterCountry.SelectedText.Value) && !(Dropdown_FilterCountry.SelectedText.Value in Country)
    );

    We added an edge case for no selections and combine all conditions in one RemoveIf function with an or operator ||.

     

    If this solves your question, would you be so kind as to accept it as a solution.

    Thanks!

  • Gilmour Profile Picture
    362 on at

    Hi @LaurensM . That worked! Thank you!

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard