Hi everyone,
i want to use the power automate to upload files from Power Apps to SharePoint Document Library.
It is work to upload file but there will replace if upload the same file.
May i know how to update the flow that it can upload the same file that save as new one or how to change the file name more different?
Below is my power app code:
Set(vCLPInspectionPhotosPath,"https://clpgroup.sharepoint.com/sites/CLPEMSform/CLPE%20Inspection%20Photos/"& BrowseGallery.Selected.Title &"/");
Clear(vPhotoPathCollection);
ForAll(
Attachment_Inspection_Record.Attachments,
IfError(Uploadfiletosharepoint_CLPE.Run(
BrowseGallery.Selected.Title,
{file:{name: BrowseGallery.Selected.Title & "_" & Text(Today(),"dd-mm-yyyy") & "_Inspector Record.jpeg", contentBytes: ThisRecord.Value}}),
Notify("Photo Upload Failed"));
Collect(vPhotoPathCollection, vCLPInspectionPhotosPath & BrowseGallery.Selected.Title & "_" & Text(Today(),"dd-mm-yyyy")&"_" &"_Inspector Record.jpeg");
);
Set(vPhotoPath1, Index(vPhotoPathCollection, 1));
Patch(
'CLPE Inspection Record', Defaults('CLPE Inspection Record'), {
Photo1: vPhotoPath1.Value
my flow:
Would anyone can help?
Thank you very much for your help.