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 Gallery row rec...
Power Apps
Answered

Delete Gallery row record and same Sharepoint record as saved in JSON format

(0) ShareShare
ReportReport
Posted on by 527

Hi

I have a Sharepoint list (visitorsRegistration_New), Column (canteenJson) and patching data in JSON format as mentioned below along with GUID reference number.

knsrinath_3-1680002579497.png

I am able to fetching the JSON formatting data to Gallery as a collection name is colFilterList

 

knsrinath_0-1680002255544.png

I want delete one row in Gallery  displaying as a collection. I have used the following formula Onselect Delete button.

 

Remove(colFilterList,ThisItem)

 

 

This formuls is deleting Gallery row only. But I need to delete same row in Sharepoint JSON record also.

 

Request you help me to delete Sharepoint record.

 

Thanks & Regards

 

 

 

Categories:
  • WiZey Profile Picture
    3,023 Moderator on at

    Hello @knsrinath ,

     

    If you're collecting the record's ID along with the JSON, you can use "RemoveIf()" to delete it.

     

    RemoveIf(
     datasource,
     ID = ThisItem.ID
    )

     

    Or, if the record in your gallery is the exact same as the record in your list, a single "Remove()" works too.

     

    Remove(
     datasource,
     ThisItem
    )
  • knsrinath Profile Picture
    527 on at

    Hi @WiZey 

     

    I have a JSON array saved in one ID and ID = 28

     

    [
    {
    "Date": "2023-03-27",
    "Department": "P",
    "Employee_ID": "5",
    "Employee_Name": "H",
    "Indenter_Name": "Bu",
    "Meal_For": "Dinner",
    "Meal_Type": "OT",
    "Order_No": "00030",
    "Order_Shift": "Shift-A",
    "Remarks": "12",
    "Shift": "A+4",
    "refNo": "0197e089-be89-4bc3-939e-f99c5688c5f5"
    },
    {
    "Date": "2023-03-27",
    "Department": "PU",
    "Employee_ID": "50",
    "Employee_Name": "EP",
    "Indenter_Name": "Bu",
    "Meal_For": "Dinner",
    "Meal_Type": "CP",
    "Order_No": "00030",
    "Order_Shift": "Shift-A",
    "Remarks": "32",
    "Shift": "B+4",
    "refNo": "9df21087-da2a-4c6d-9878-0f6fe4a0e08c"
    },
    {
    "Date": "2023-03-27",
    "Department": "P",
    "Employee_ID": "50",
    "Employee_Name": "T",
    "Indenter_Name": "B",
    "Meal_For": "Dinner",
    "Meal_Type": "CP",
    "Order_No": "00030",
    "Order_Shift": "Shift-A",
    "Remarks": "33",
    "Shift": "A+4",
    "refNo": "8a80406d-afe8-4787-a04e-8305d41259b9"
    }
    ]

     

    Out of 3 I need to delete only one record mentioned in below

     

    {
    "Date": "2023-03-27",
    "Department": "PU",
    "Employee_ID": "50",
    "Employee_Name": "EP",
    "Indenter_Name": "Bu",
    "Meal_For": "Dinner",
    "Meal_Type": "CP",
    "Order_No": "00030",
    "Order_Shift": "Shift-A",
    "Remarks": "32",
    "Shift": "B+4",
    "refNo": "9df21087-da2a-4c6d-9878-0f6fe4a0e08c"
    },

     

    Thanks & Regards

     

  • WiZey Profile Picture
    3,023 Moderator on at

    I see, you need to update a record's column, not delete a whole record.

     

    In that case, I'd suggest using "Patch()" to edit your record with a new JSON value depending on what's remaining in the gallery.

     

    First, you delete the records in your gallery to clean up the JSON.

    Then, the save button update the record with what's left of the JSON.

     

    I recommend putting the code in a save button, because the delete button would not be a good fit for updating the record in the list.

     

    Patch(
     datasource,
     LookUp(datasource, ID = Record.ID),
     { JSON : newJSON }
    )

     

    I'm not really sure how you constructed your JSON, so I'll leave that part to you. 

  • Verified answer
    knsrinath Profile Picture
    527 on at

    Hi @WiZey 

     

    In one ID 3 records are saved in JSON format.

    I can not delete entire ID. I want to delete only one record from JSON array 

     

    Is there any possible to delete single record with GUID number instead of ID

    Thanks & Regards   

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard