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 Apps
Unanswered

Remove function

(0) ShareShare
ReportReport
Posted on by 3

Hello,

 

I'm building an app for work and I'm still a novice with PowerAPP.

 

I'm stuck with one task and it would be appreciated if someone could help me.

 

I'm trying to have an Item deleted from the collection as well as my SP List, but at the moment it only remove the item from the collection.

 

I tried different formulas and functions, but I'm stuck 😕

 

At the moment my trash button has the below OnSelect -

 

Remove(PrinciplesCollection,ThisItem);
Refresh('HLD Principle');

 

I'd need another step to have the item removed from the Collection and the list ( HLDPrinciple at the same time)

I've tried to add the below formula -

RemoveIf('HLD Principle',ThisItem.IsSelected)

 

But it erases all my items at once in the SP List

 

any idea of what I'm doing wrong?

 

Categories:
  • EdViegas Profile Picture
    436 on at

    Assuming that your trash button is inside a Gallery, try this code for OnSelect property to remove item from SharePoint List

    RemoveIf('HLD Principle', ID = ThisItem.ID);

    If you are using a Collection as items for Gallery, you need to recreate it, for example:

    ClearCollect(PrinciplesCollection, 'HLD Principle');

     But... Why are you using a collection instead of directly the SPO List?

  • Fify Profile Picture
    3 on at

    Thanks a lot!

    Because people have the choice to add several principles and we want them to see them on their screen when they are adding/deleting it.

     

    Would there be a better way of doing it?

  • EdViegas Profile Picture
    436 on at

    In this scenario (see before patch) you are on the right way

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

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard