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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Remove If and Collect
Power Apps
Unanswered

Remove If and Collect

(0) ShareShare
ReportReport
Posted on by 16

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.

Categories:
I have the same question (0)
  • v-micsh-msft Profile Picture
    on at

    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

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard