Hello!, I'm hoping someone can help.
I'm trying to use "Replace" within an expression to replace a part of an URL to redirect files from SharePoint library to sharepoint library. I have a lot of trouble understanding how to properly formulated expressions.
I am trying to copy files from one library to an other. But which folder/sub folder is variable, it depends on where the source file is located. but these folder structure is completely the same between the 2 librarys.
https://Xonline.sharepoint.com/teams/project X/libraryone/folder 1/sub folder 1.1
replace whit;
https://Xonline.sharepoint.com/teams/project X/librarytwo/folder 1/sub folder 1.1
Or is there maybe another way to achieve the same think? Any surggestions?
1
2
Hello @S_J_G
I don't get your point... Questions:
1) Do you want to move a file from one library to another? Or do you want to copy it?
2) Where is stored the destination document library? Or is it always the same?
3) Which kind of error do you receive? Or is the flow working fine but with wrong results?
Regards,
Ferran
Hi @fchopo
For more context view:
1) Do you want to move a file from one library to another? Or do you want to copy it?
Copy
2) Where is stored the destination document library? Or is it always the same?
both folders are on the same sharepoint site, but in different libraries
3) Which kind of error do you receive? Or is the flow working fine but with wrong results?
Hello @S_J_G
Just a couple of issues I see:
1) The "append to string variable" (TargetPath) action is empty, and that's the error.
2) You should use the TargetPath variable in the "Create File" action.
Hope it helps!
Ferran
hi @fchopo
What do you mean whit "action is empty" ?
Still getting the same error.
Replace expression:
Replace(Outputs('(I)_Get_files_(properties_only)_-_Internal_workspace')?['body'],'/teams/Zuidplaspolderfase5/Actuele stukken omgeving','')
As I understand, and by your example, you should use the following expression in the TargetPath:
Replace(URL,'/libraryOne/','librarytwo')
Where the URL is the URL of the source file (the file you want to copy).
Hope it helps
Ferran
Hi @fchopo
Can you help my formulate the expression? I first need te extract the 'Path' from the body?
Replaceoutputs('(I)_Get_files_(properties_only)_-_Internal_workspace')?['{path}'],'/Werkdocumenten 06/','/Actuele stukken omgeving/')
I'm sorry but I'm lost on your problem. Let's see if anybody else can help you.
Regards,
Ferran
@fchopo Alright, am I not asking the question correctly? sorry english is not my native language.
https://Xonline.sharepoint.com/teams/project X/libraryone/folder 1/sub folder 1.1
replace whit;
https://Xonline.sharepoint.com/teams/project X/librarytwo/folder 1/sub folder 1.1
I need to replace the red part with the green part. But the purple part is not static.
so i cant simpely use the a static URL in the Replace function.
I need to know the folder path for each source file then i need to be able to use the "folder path" in the replace fuction
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
63 | |
51 | |
30 | |
29 | |
24 |