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
Super User

@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
Super User

@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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,126)