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 Apps
Unanswered

Remove Record

(0) ShareShare
ReportReport
Posted on by 986

Hi everyone,

I was implementing the remove functionality from the gallery (data source as Excel file). I was referring the documentation section for remove() but was getting an warning: 

Sidhant_02_0-1671702112126.png

The format for OnSelect for Delete button as per the format. I have used a flag varShowPopup to rest the flag to false as the next statement after remove to hide the pop-up box.

Screenshot 2022-12-22 151245.png
Categories:
  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    HI @Sidhant_02 ,

    Assuming you have a unique identifier column in your record (replace with the field name)

    RemoveIf(
     Contacts,
     IdentifierName = Gallery1.Selected.IdentifierName
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • Sidhant_02 Profile Picture
    986 on at

    So the IdentifierName should be replaced with one of the columns from my Excel?
    How to make a column unique?

    Sidhant_02_0-1671703751814.png

    Why cannot we use only Remove to remove a record instead of RemoveIf where in we have to specify a condition?.

    Screenshot 2022-12-22 153841.png
  • timl Profile Picture
    37,287 Super User 2026 Season 2 on at

    Hi @Sidhant_02 

    Your screenshot shows that you've imported the Excel data into your app.

     

    timl_0-1671704654691.png

     

    Data that you import into Excel is static/read-only, and you won't be able to add or remove records.

    Instead, if you save your Excel spreadsheet to OneDrive and connect to it from there, your original Remove formula will work.

    There are more details on how to do this here.

    https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/connections/connection-excel

     

     

  • Sidhant_02 Profile Picture
    986 on at

    I will try this

  • WarrenBelz Profile Picture
    156,714 Most Valuable Professional on at

    @Sidhant_02 ,
    I was simply giving you an alternative I know works. If you have a column where no two records in the table have the same value, then that is a unique identifier. I would suspect that in the Contacts Table, that is the name of the person. However I now see @timl 's observation and he is correct - you simply cannot delete records from static data.

  • Sidhant_02 Profile Picture
    986 on at

    Refer my reply

  • Sidhant_02 Profile Picture
    986 on at

    Hi, 
    I had created a new excel on my OneDrive and after connecting it to the Vertical Gallery when I inserted a label the record was not being displayed even after entering proper expression. Could you please let me know what is going wrong @WarrenBelz @timl 
    The Id tab which power apps usually generates when we connect it to an excel is  not getting displayed. For the first time it was working fine but there was one issue with Cancel button so I tried adding few records but it threw error so I created a new file but now the records are not shown.

    Sidhant_02_0-1671780614701.png

     

    NoRecord_Displayed_InGallery.png
    Screenshot 2022-12-23 125810.png
    Excel_Info_OneDrive.png

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

#2
M Bilal Khan Profile Picture

M Bilal Khan 318

#3
Mohsin Ali Profile Picture

Mohsin Ali 220

Last 30 days Overall leaderboard