
Announcements
I am trying to use RemoveIf to remove records from an Excel spreadsheet table (used as a staging data source). It works and removes the records, but changes the cell formatting on a lot of the table columns (which then breaks an earlier Collect function I use to populate the staging data source). I am trying to use Collect to populate the table, then RemoveIf to remove the records, and Collect to re-populate the same table with new data. Any ideas on how to prevent RemoveIf/Collect from changing the cell/column formatting would be appreciated ... or how to accomplish the general requirement of using Collect to populate the staging table, then RemoveIf to remove the records, and then Collect to re-populate the staging table.
The removeif is structured as follows: RemoveIf(datasource,true) where datasource is the staging table defined in the excel file. The collect function is structured as follows: Collect(datasrouce,collection) where collection is a collection created in the app from a series of other data sources and some adjustments. It appears I am having the most difficulty in the formats that have dates. When I run the removeif and then the collect - after the first run (runs 2 onward) - it changes the formats from date to general and places in them. ie: it is changing 2/1/2017 to 2017-02-01T04:00:00.000Z.
Hi @OlinMeeks,
Apologize for the late response.
I think the issue here should be caused by the collection function:
Collect(datasrouce,collection)
It is not recommended to use data source (Actual Excel ) as the first parameter, if here you would like to update data into the data source, take a try with the patch function.
Further, the date issue should be mostly caused by PowerApps service. Generally PowerApps would convert date string into UTC format.So we trying to insert date into Excel, the format might be affected.
Please take a try to create a Macro Recorder to format the date after new data updated.
Automate tasks with the Macro Recorder
Regards,
Michael