web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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

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:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,073 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
    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
    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
    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
    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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard