Hi @eka24 ,
I cheat… 😁
True either Patch or Collect don’t remove the record from the original table, so a ClearCollect will return the deleted records too. Furthermore I also found that collect doesn’t modify a record from the original table.
I added an extra column called Updated to both the original table and the collection. Default the values in this column are set to “No”. When I delete a column I mark it as “Deleted”. Likewise I mark records with “Inserted” or “Changed”. When I save the collection to the Excel sheet these columns a written too.
I also do a ClearCollect to refresh the collection which includes the previously deleted records. But – and here is the cheating part – I also do a
RemoveIf(cUsers; Updated = "Deleted");;
UpdateIf(cUsers;Updated <> "No";{Updated: "No"})
which makes that I get a new fresh collection to continue working.
So the Excel sheet itself has still the deleted records, which is good because the Excel sheet in its turn will be synchronized with an SQL database. Records marked as “Deleted” will be removed from the database on synchonization.