cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Soumodip
Helper II
Helper II

One drive "create file" replaces old file in the source folder

Hi,

I am have created a Flow, which uses "Create CSV Table" and then store the output as a file in a One Drive folder using One Drive "Create File".

The data is coming from a SharePoint list. The Flow triggers when a new item is created.
Problem:

Each time the flow runs it replaces the old file in the source folder.

Issue.jpg

2 ACCEPTED SOLUTIONS

Accepted Solutions
ScottShearer
Super User III
Super User III

@Soumodip 

To preserve the original file, consider adding something like the current date and time after the EmployeeName name in the action.  You'll enter utcNow() in the expression window.  It should look something like this:

Filename.png

 

Be sure to click on Update after entering utcNow() in the expression window.

Another alternative is just to let the file be overwritten.  Versioning is turned on by default in OneDrive for Business.  Creating the new file with the same name should just add a version to the existing file (double check me on this...)

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Soumodip
Helper II
Helper II

Sorry!
I had made a silly mistake. I was getting the file name from after "Get item", which was returning the same name.

I fetched the name from "When an item is created" and that solved the problem!

View solution in original post

3 REPLIES 3
ScottShearer
Super User III
Super User III

@Soumodip 

To preserve the original file, consider adding something like the current date and time after the EmployeeName name in the action.  You'll enter utcNow() in the expression window.  It should look something like this:

Filename.png

 

Be sure to click on Update after entering utcNow() in the expression window.

Another alternative is just to let the file be overwritten.  Versioning is turned on by default in OneDrive for Business.  Creating the new file with the same name should just add a version to the existing file (double check me on this...)

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

Soumodip
Helper II
Helper II

Sorry!
I had made a silly mistake. I was getting the file name from after "Get item", which was returning the same name.

I fetched the name from "When an item is created" and that solved the problem!

View solution in original post

Hi @ScottShearer,

This works too! Thanks.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,455)