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 / How to delete item in ...
Power Apps
Answered

How to delete item in a Sharepoint List if Email exits in the List

(2) ShareShare
ReportReport
Posted on by 35
Hi,
 
Please can someone suggest the fx code to do the following:
 
I am using a Canvas App. which has a button called btnRemoveLineManager
I also have a combobox (People Picker) called cmbGetLineManagerAccount
 
I have a Sharepoint List called My Line Managers List and a Column in that list called Service Line Managers Email that stores emails as text.
 
I want to get the Email from the combobox (People Picker) cmbGetLineManagerAccount selected and check if the Email exists in the Sharepoint List My Line Managers List in the column Service Line Managers Email . 
 
If the email from cmbGetLineManagerAccount exists i then want to delete the item from the Sharepoint List, then refresh/update the List.
 
The sharepoint List could have thousands of items, so avoiding delegation issues would also need to be taken into account. 
 
The fx code would be put into the On Select event on the btnRemoveLineManager button.
 
Thanks in advance for any advice/suggestions
 
I have the same question (0)
  • Verified answer
    Vish WR Profile Picture
    1,191 on at
     
    You can try this 
    With(
        { varEmail: cmbGetLineManagerAccount.Selected.Mail },
        RemoveIf(
            'My Line Managers List',
            'Service Line Managers Email' = varEmail
        )
    );
    Refresh('My Line Managers List');
  • CU10041356-0 Profile Picture
    35 on at
    Brilliant - thank you.
    Works exactly as required.
  • Vish WR Profile Picture
    1,191 on at
    Glad it worked for you.
     
    Happy coding :)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 519

#2
WarrenBelz Profile Picture

WarrenBelz 439 Most Valuable Professional

#3
Vish WR Profile Picture

Vish WR 433

Last 30 days Overall leaderboard