Hi
I have workflow where staff can submit the file by drag and drop in a Document folder in SharePoint, in this case SP-Staff.
This will trigger a workflow where the file will be copied to another Document folder in another SP site, SP-Admin. At the same time, an email will be sent out to the staff that the file has been received by Admin.
However, sometime, the file dropped by the staff became duplicate or more, sometime up to 4, 5 duplicates. And, emails will be sent out few times also. This mostly happened when the staff drag and drop few files together.
I would like to know why did this happen? And, how to solve this issue?
Thanks
Pauline
Solved! Go to Solution.
Hi @PaulineTCL ,
Have you solved this issue? If not yet, please try and use another output from the trigger for the filter query:
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Are you able to s how us the configuration of your flow? My guess is that you've got an Apply To Each that's duplicating, but of course I'd need to see it to tell you.
I answer questions on the forum for 2-3 hours every Thursday!
Hi
Following is my flow:
Flow ends after the 'Delete File'.
Thank you!
Do you have any Filter Query on your "Get Files (properties only)"?
I answer questions on the forum for 2-3 hours every Thursday!
Hi
This is my Get Files (properties only). 'Filter Query' I didn't put any entry.
Okay.
So, if your staff drag & drop multiple files, when it hits the "Get Items", it is going to find every file that came at the same time - not just the one. Your trigger is "When a file is created", so it would trigger for each any every one of these.
The solution: use Filter Query to filter on the filename in your Get Files (Properties Only). Then it will only pick up the one file it has triggered on.
I answer questions on the forum for 2-3 hours every Thursday!
Hi
Is it like this:
Close! Filter Query: FileLeafRef eq 'FileNameDynamicContent'
(Where FileNameDynamicContent is the same as what you have in y our screenshot)
I answer questions on the forum for 2-3 hours every Thursday!
Hi
There was error after I added the Filter Query and tested it.
I tested by dragging 3 files together and none of the files passed the flow at 'Get Properties'. Tried also just dragged 1 file (other file), same error.
I will copy the flow and do the test again later, as I need to ensure office operations not interrupted for now.
Thanks
Hi @PaulineTCL ,
Have you solved this issue? If not yet, please try and use another output from the trigger for the filter query:
Best regards,
Community Support Team _ Jeffer Ni
If this post helps, then please consider Accept it as the solution to help the other members find it.
Hi Jeffer Ni
Sorry for trying out after 2 months of your reply.
May I know, for the 'When a file is created' [the one I used in my flow], do I need to change to 'When a file is created in a folder' as you have shown in your reply above?
I couldn't get the 'x-ms-file-name-encoded' from the 'Add dynamic content'. I can only see the few options as shown below.
Last 2 weeks, only ONE of my staff having problems where 2 files which he uploaded once in mid of September, these 2 files 'auto-uploaded' itself few times in a day and after 1-2 days, again it 'auto-uploaded'. Not sure what happened. And, only those 2 files.