cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JB0007
Helper IV
Helper IV

Remove specific value from SharePoint List

Hi Power Apps community,

 

I am trying to use the Remove function in order to delete specific data in SharePoint List.  
Powerapps.png
If I use the example above, I want to delete only a part of the record (NOT the whole record). In short, I want to delete only the "200" and NOT the:     2 | "Vanilla" |

I am using a gallery and my code is as follows:

 

Remove(Inventory, Gallery3.Selected.Picture); Refresh(Inventory)

 

I have specify the column name (Picture) hoping it would delete only data in that column but it gives me an error.
Further, I want to also know if there is a code that if a person clicks a button it would subtract only a number from "Quantity".  For example (200 - 1 = 199).

 

It is a silly question but I have search all around for it and I could not find a solution. 

1 ACCEPTED SOLUTION

Accepted Solutions
mdevaney
Super User III
Super User III

@JB0007 

The REMOVE function is for deleting entire rows of data.  Your goal is to remove only a specific field called Picture.  Therefore, we will have to use another function called PATCH instead.

 

Patch(Inventory, LookUp(Inventory, ID=Gallery3.Selected.ID), {Picture: Blank()});
Refresh(Inventory);

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

4 REPLIES 4
mdevaney
Super User III
Super User III

@JB0007 

The REMOVE function is for deleting entire rows of data.  Your goal is to remove only a specific field called Picture.  Therefore, we will have to use another function called PATCH instead.

 

Patch(Inventory, LookUp(Inventory, ID=Gallery3.Selected.ID), {Picture: Blank()});
Refresh(Inventory);

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

Hi @mdevaney thanks for the reply.

 

I have tried the formula but it gives me an error ("The patch function have some invalid arguments").

@JB0007 
I made a silly error.  Please see my corrected code in the post above.

Thanks @mdevaney , it works perfectly now.

 

However, when I leave the formula with the "Blank()" function, it doesn't change the value to NULL. (I think my SharePoint have something to do with it). But I have replaced the "Blank()" function with "-" and it works perfectly. Thanks again.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (44,584)