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 / Delete only selected i...
Power Apps
Answered

Delete only selected item in sharepoint list

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello,

 

May i know how to delete only selected item in sharepoint list.

 

For example, i have Alias, Email, Address and postcode.

 

And i only want to delete postcode and Address only.

 

I used Remove('hardware list', Gallery6.Selected) but it will delete all the list.

 

Kindly need your help on this.

 

Thank you!

 

 

Categories:
  • WarrenBelz Profile Picture
    156,528 Most Valuable Professional on at

    Hi @Anonymous ,

    You can Use Patch()

    Patch(
     'hardware list',
     {ID:Gallery6.Selected.ID},
     {
     Postcode:Blank(),
     Address:Blank()
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    Thank you for your prompt reply.

    I tried to do as follow but unfortunately its not working.

     

    Patch(
    'hardware list',
    {ID:Gallery6.Selected.ID},
    {
    analyst:Blank(),
    Availiblity:Blank()
    }
    );

    Notify(
    "Hardware Removed Successfully" , Success);

     

    Do you have any idea why it's not working from my side?

     

     

  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @Anonymous 

     

    Can you try to update the expression to:

    Patch(
    [@'hardware list'],
    LookUp([@'hardware list'],ID=Gallery6.Selected.ID),
    {
    analyst:Blank(),
    Availiblity:Blank()
    }
    );

    Notify(
    "Hardware Removed Successfully" , Success);

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    What are the types of analyst and Availiblity column?

     

    If they are Text, Number, Date and Person column from Sharepoint list, you need to patch Blank() to the fields. But the important premise is to enable the Formula level error management in Experimental features.

    Patch('hardware list',{ID:Gallery6.Selected.ID},{ColumnName:Blank()})

    If they are  Choice and Lookup column, the code should be like this:

    Patch('hardware list',{ID:Gallery6.Selected.ID},{ColumnName: {Id: -1,Value: Blank()}})

    Hope this helps.

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi,

     

    I already tried that also and it's not working.

     

    For your information the data type for :

     

    analyst is person/group

    availability is choice

    Reason is text

     

     

  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    Is there any error message on the formula? Does the 'Gallery6.Selected.ID' return the ID of record you want edit?

    1. enable the Formula level error management feature

    Snipaste_2020-07-20_17-45-35.png

    2. try the following code.

    Patch('hardware list',{ID:Gallery6.Selected.ID},{analyst:Blank(),Availability: {Id: -1,Value: Blank()}, Reason:Blank()})

    Hope this helps.

    Sik

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

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard