Hello Festina...I 've one query...In a screen i want to add two attachments fields( 1st ,2nd attachment)..once we click on submit button the attachments has to save in two different folders( 1st ,2nd folders)..can you help me on this? ....I 've tried by connecting Power Apps and Power Automate but its throwing and error?
Hello Sanjay, 1. Create an attachment control called Attach in your App. 2. Create a flow triggered by Power Apps. 3. In the Inputs of the Flow, add File Content. 4. Next, add a Create File action and provide the folder path of your Folder 1. 5. In filename give, triggerBody()?['file']?['Name']
6. In file content, give, triggerBody()?['file']?['contentBytes'] 7. Save the flow as AddFilesInFolder1. 8. In the App, create a button and add below formula in the OnSelect property of the button.
ForAll( Attach.Attachments, AddFilesInFolder1.Run( { file: { name: ThisRecord.Name, contentBytes: ThisRecord.Value } } ) ) 9. Once you click the button, all the files in the Attach control will be added in your Folder 1. Perform the same steps for your second folder. You can add another attachment control and in the create file action of your flow, you need to provide the path of your second folder.
Hello Festina...I 've one query...In a screen i want to add two attachments fields( 1st ,2nd attachment)..once we click on submit button the attachments has to save in two different folders( 1st ,2nd folders)..can you help me on this? ....I 've tried by connecting Power Apps and Power Automate but its throwing and error?
Hello Sanjay,
1. Create an attachment control called Attach in your App.
2. Create a flow triggered by Power Apps.
3. In the Inputs of the Flow, add File Content.
4. Next, add a Create File action and provide the folder path of your Folder 1.
5. In filename give,
triggerBody()?['file']?['Name']
6. In file content, give,
triggerBody()?['file']?['contentBytes']
7. Save the flow as AddFilesInFolder1.
8. In the App, create a button and add below formula in the OnSelect property of the button.
ForAll(
Attach.Attachments,
AddFilesInFolder1.Run(
{
file: {
name: ThisRecord.Name,
contentBytes: ThisRecord.Value
}
}
)
)
9. Once you click the button, all the files in the Attach control will be added in your Folder 1.
Perform the same steps for your second folder. You can add another attachment control and in the create file action of your flow, you need to provide the path of your second folder.