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

Community site session details

Session Id :
Power Apps - Building 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.

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    151,757 Most Valuable Professional on at
    Re: Remove Record

    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
    Re: Remove Record

    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?.

  • timl Profile Picture
    35,805 Super User 2025 Season 2 on at
    Re: Remove Record

    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
    Re: Remove Record

    I will try this

  • WarrenBelz Profile Picture
    151,757 Most Valuable Professional on at
    Re: Remove Record

    @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
    Re: Remove Record

    Refer my reply

  • Sidhant_02 Profile Picture
    986 on at
    Re: Remove Record

    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

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 652 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 236

Last 30 days Overall leaderboard