cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Remove doesn't remove record from excel

Hi all,

 

I am using the remove command as so:

Remove(Table1, 'Main Data Table'.Selected)

However this doesn't actually change the table, only the display on powerapps' side. Is there a way to have this command change the table itself in the same way many of the other powerapps commands do?

6 REPLIES 6
Drrickryp
Super User
Super User

Hi Colleen,

 

If your data source is a table named Table1 in an Excel file residing in either DropBox or OneDrive  and you have selected a record in either a datatable control or a gallery control, Remove (Table1, Gallery1.Selected) or Remove(Table1, DataTable1.Selected) should remove it from the Excel table.  However, you may want to check to see if the data source for your Remove function is a collection derived from an excel data source and not the data source itself.  If it is, that would explain why the record is removed from the display and not from the underlying Excel table. 

Anonymous
Not applicable

Hi @Drrickryp,

 

Unfortunately that isn't the case which is why I am confused as to why it isn't working. The formula is connected directly to the DataTable from excel and yet still isn't changing the table. My other commands linked to the same table (submit, edit etc) are working and changing that table.

Hi @Anonymous, 

Can you clarify a few things more explicitly:

  • You have an OnSelect formula in your DataTable that is expecting the selected record to be removed
  • Is the selected record removed from the datasource?
  • If I understand correctly, the selected record does not appear removed from the data table.
  • Can you share a session ID where you can get this to occur?
    https://aka.ms/pa/sessionid
    https://aka.ms/pa/sessionid-web

 

Brian

Microsoft Employee
@8bitclassroom

Hi @Anonymous were you able to make this work? I'm having the same issue...

 

Regards,

Oscar

Hi @oscarmqz

Are you having the exact same issue as @Anonymous?:

  • Data stored in Excel
  • Using Remove(Table1,DataTable.Selected) to remove a record
  • Record is removed in app, but not in the underlying spreadsheet
civector
Regular Visitor

I am having exactly this problem with deleting a row from Excel using PowerApp.

 

My PowerApp uses both a SharePoint List and an Excel file stored in SharePoint.  I create, update and delete the same data from both sources.  I use the SharePoint List as my main source for the app, but add the Excel file so that I can download it and update a desktop version of the file (with macros) to refresh the desktop version.  This way, I can use the app to provide an interface for viewing and modifying the data and use VBA to refresh that data for various users.  

 

With "Assets" as the SharePoint List and "AssetsXL" as a table in Excel:

 

Remove(Assets,LookUp(Assets,Title=varTitle));
Remove(AssetsXL,LookUp(AssetsXL,Title=varTitle));

 

The SharePoint List remove the row as expected but the Excel Table does not.

 

Helpful resources

Top Solution Authors
Top Kudoed Authors
Users online (4,142)