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 / removing item from col...
Power Apps
Answered

removing item from collection not working

(1) ShareShare
ReportReport
Posted on by 90

The solution to this should be easy but so far I have not been able to find the correct syntax.

Dropdown1 is populated using a collection, colPurposes.

I want Dropdown2 to be the same collection less the item selected in Dropdown1.

Dropdown1 items: colPurposes

Dropdown2 items: Remove(colPurposes,'itemContents'=Dropdown1.Selected.'itemContents')

The remove doesn't work.

I have also tried:

RemoveIf,

putting the selection in Dropdown1 in a variable and trying to compare that in the Remove,

Remove(colPurposes,{Value: Dropdown1.Selected.'itemContents'})

I also added temp text fields to display the value in the Selected item.

Any direction appreciated.

. 

 

Categories:
  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    Hey @disappointed ,

     

    you can use the Remove function like this: 

    Remove(colPurposes,Dropdown1.Selected)

    Remove and RemoveIf functions - Power Platform | Microsoft Learn

     

    I've never tested it this way so let me know if it works. 

     

     

  • disappointed Profile Picture
    90 on at

    Good try but it didn't work. I get the "There is an error in this formula. Try revising and running it again. Data type: Record."

    Like I say, it should be simple.

  • Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    Then we will do it the old Fashioned way: 

    Remove(colPurposes,LookUp(colPurposes, ID=Dropdown1.Selected.ID))

    This should work. Just make sure where to put the code. It can't be placed as Item in Dropdown 2

     

  • disappointed Profile Picture
    90 on at

    I have been trying to put it in items. Dropdown2 is not visible until a selection is made in Dropdown1. What's your recommendation for where it should go?

  • Verified answer
    Daniel Bocklandt Profile Picture
    5,151 Super User 2026 Season 1 on at

    It has to go in a button or OnChange. However OnChange has the risk to delete a Record that has been selected by accident. To just use the Itsem proprty you could do this: 

    Filter(colPurposes, ID <>DropDown1.Selected.ID)

     

    Your collection does not lose Data but the dropdown 2 will not show the record selected in Dropdown 1.

     

  • Verified answer
    disappointed Profile Picture
    90 on at

    Yes!!! This syntax worked. Thank you.

    Carter

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard