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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Top Kudoed Authors
Users online (73,330)