Hi Team
I have fileContent as my input for power app, now i want to integrate this field with Run function on the form, how to attach file and be stored in sharepoint?
RestartNCRFlow.Run(Finding_desc.Text, Text(Due_Date_Details_Calendor.SelectedDate, "yyyy-mm-dd"),
Root_Cause_txt.Text, Corrective_Action_txt.Text, Prevent_Action_txt.Text, Status_Details_dropdown.SelectedItems, {}// file attachment logic here);
NewForm(Corrective_Action_Form);
SubmitForm(Corrective_Action_Form);
Naimish MakwanaPosted Apr 30, 2024, 10:14 AM
To attach a file and store it in SharePoint from Power Apps, you can use the
Patchfunction to create or update records in your SharePoint list. Here’s how you can modify yourRunfunction to include file attachment logic:In this code,
fileContent.SelectedItemsis used to get the selected file(s) from your file input control. TheForAllfunction is used to iterate over each selected file and create a collection (colAttachments) of attachments. This collection is then passed to yourRunfunction.Please replace
fileContentwith the actual name of your file input control in Power Apps. Also, ensure that your flow (RestartNCRFlow) is set up to accept and handle the file attachments.Thanks