Hello there! I am using the following flow to send pictures from Power Apps to SharePoint using Power Automate. https://gyazo.com/3f22452665a9415b8444801f2e42eb7c
I want it to create a folder on a certain location and put the files inside of it. But the name has to match up with the order nummer that has been filled in power apps, is this possible?
I use this function to start the flow:
Set(varDemoFromAttachmentControl; JSON(Image2.Image; IncludeBinaryData));; Set(varBase64Only; Mid(varDemoFromAttachmentControl; Find(","; varDemoFromAttachmentControl)+1; Len(varDemoFromAttachmentControl) - Find(","; varDemoFromAttachmentControl) -1 ));; Set(varFileLink; EasyUpload.Run(Last(AttachmentControl.Attachments).Name; varBase64Only).sharepoint_link);;
I am using the attachment control for this: https://gyazo.com/fb48f78d53360462727461e9b18e512c
What if you try this:
"." & Last(Split(Last(AttachmentControl.Attachments).Name, ".")).Result,
Hi @Anonymous :
I don't see any problem from your description.Could you tell me:
Which of the two situations I described is correct? If they are not correct, could you describe your specific requirements in detail?
Hello! Thank you for your answer @v-bofeng-msft
My flow is working correctly normally. It is taking the name of the file to save it to SharePoint. If you save a picture named "Image1.jpg" it will take the name and create the file.
The return value is just to have a button on Power Apps that leads to this file location. Code for the button:
Yes, I have been using this tutorial from Shane Young. https://www.youtube.com/watch?v=3QaiM8SeWfM
There can be PDF's & Images in the attachment control.
Do you want to replace Last(AttachmentControl.Attachments).Name with order nummer as the name of the picture? = true in a way, but not fully.
This is how I want it to be. I want it to check if there is a folder with the ordernummer & "-" & deelorder. (Example: 18037-31). If it exists, put the attachments in there. If the folder does not exist, create it using the same formule: ordernummer & "-" & deelorder
Last(AttachmentControl.Attachments).Name an order nummer? = Not true at the moment. This currently just takes the name of the file. This code is being used to link back to the image that has been filled in. If we can get the folder to work. I'd like to just check the ordernummer & "-" & deelorder of the form that has been filled in and link to that folder so if you click on the button, you open that folder.
If we get the folder thing to work, we can leave the name of the attachment as it is. Just need to store them in that folder with the project name.
Hopefully I made this more clear to you. Thanks in advance for your respond!
Hi @Anonymous :
I originally wanted to reply, but seeing that this topic has been marked saved, I thought your problem has been solved.Maybe you can cancel it?
Please wait a moment.
Hi @Anonymous :
Could you tell me:
According to your description, the name of the picture may be
Could you describe the judgment conditions in detail? My current understanding is:
Possibility 1: Check whether there is a folder in a SPlibrary that conforms to the 18037-31 format. If it exists, use the name of the folder as the picture name. If it does not exist, use the formula ordernummer & "-" & deelorder
Possibility 2: Check whether there is a folder name equal to ordernummer & "-" & deelorder in a certain SPlibrary, if it exists, use the name of the folder as the picture name. If it does not exist, use the formula Last(AttachmentControl.Attachments).Name
I marked it as not the solution. @v-bofeng-msft
Thank you for helping me!
Link to where the folder needs to be created at: DELETED
It needs to check if there is a folder available with the following name: ordernummer & "-" & deelorder. If there is no folder, create one. After this, it needs to put the attachments in this folder.
So if I work on different projects with different ordernummers, it should be saved in another folder.
At the moment we have nothing to do with the attachments name, with the code I am using right now, it just takes the name of the attachments and saves it like this. Which is fine.
Hi @Anonymous :
Let me sort out your needs, if there are errors, please help me point them out:
1. Determine whether ordernummer & "-" & deelorder is equal to a file name in the SP library.
The judgment is established:
2. Save the picture in this folder
The judgment is not valid:
2. Create a folder with the same name and save the file in this folder
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.