cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AnkitaM
Frequent Visitor

Copied file gets modified if I modify the original file

Hello,

 

Update: 

 

On further investigation I have found that the problem is not with the deletion but the file creation. The file that gets created does not have the new row added to it.  I think the file is getting created before the row gets added. Any idea, what could be the reason for that.

@NiloferA 

--------------------------------------

 

I have a flow where I am trying to do the following:

When a form is submitted, the response from the form added as a row to a table in a sharepoint file. This sharepoint file is more like the template to be used. The updated file is then copied to another sharepoint folder with a different name. 

But now I don't want to retain the form response on the template anymore so I delete the row that was added. 

 

Problem: When I delete the row - it gets deleted from both the template and the copy file. I have tried adding a delay of 5 seconds between creating the file and deleting the row but even then it gets removed from both the files. 

 

I am using the following steps in the same order:

1. When a response is submitted

2. Get response details

3. Update a row -- for file name, I am not using any dynamic content

4. Get file content using path (I have tried using Get file content also)

5. Create file

6. Delete a row - this is when the row from both the files get deleted. 

 

Any help on what I am missing? 

-----------------------------------------------------------

 

1 ACCEPTED SOLUTION

Accepted Solutions
AnkitaM
Frequent Visitor

Update: 

I have found a post with similar issue. The problem is not with deleting the row but rather that the files gets created before the add row is completed. Adding a delay between adding the row and getting the file content can be used as a temporary solution. How much the delay time will differ from case to case so you will have to determine on your own. This author used a 50 seconds delay, mine worked with 5 seconds delay.

 

More details on the solution here: https://powerusers.microsoft.com/t5/Using-Flows/Add-row-in-Excel-not-working-all-times/m-p/469535#M1...

I am closing this issue now. Thank you to those who took out the time to go through it.

 

 

View solution in original post

3 REPLIES 3
NiloferA
Solution Supplier
Solution Supplier

Hello @AnkitaM ,

I see that you are trying to update file A, copy the data from File A to file B and when you delete it from File A it gets removed from File B too.

I did the same operation and it's working fine for me. Would it be possible for you to share your Flow?

Just sharing here a screenshot of a Successful Flow Run and My Source and Target Excel Files.

 

NiloferA_0-1619780457253.png 

Flow Run

NiloferA_1-1619780546273.png

Source File (Row has been deleted)

NiloferA_2-1619780592457.png

Newly Created File

Hi @NiloferA,

I tried again but it is the same. Here are the flow and the results.

 

FlowFlowAdding a row to the templateAdding a row to the templateGetting file contentGetting file contentCreating new file in a different locationCreating new file in a different locationDeleting the row from templateDeleting the row from templateNew fileNew fileTemplate fileTemplate file

AnkitaM
Frequent Visitor

Update: 

I have found a post with similar issue. The problem is not with deleting the row but rather that the files gets created before the add row is completed. Adding a delay between adding the row and getting the file content can be used as a temporary solution. How much the delay time will differ from case to case so you will have to determine on your own. This author used a 50 seconds delay, mine worked with 5 seconds delay.

 

More details on the solution here: https://powerusers.microsoft.com/t5/Using-Flows/Add-row-in-Excel-not-working-all-times/m-p/469535#M1...

I am closing this issue now. Thank you to those who took out the time to go through it.

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,253)