In my app I have the user fill out a form.new which is writing to a sharepoint list successfully.
OnSuccess, it then is asked to run a powerautomate flow whereby it adds the image on a peninput as an attachment to the item.
It asks powerapps for two parameters to do so: the ID of the list item I wish to add the attachment to, and the file content.
The file content in powerapps is a Base64toBinary of the json object of the image the user has created in the peninput. This part works, it's the ID not working. The ID parameter is form.lastsubmit.ID.
I am getting this error message in powerapps when I use it: "accidentandincidentsignoff.Run failed: The method 'Run' has an invalid value for parameter 'Addattachment_Id'"
It is uploading the item to sharepoint fine but it is not adding the attachment
Any ideas?
The submit button for the form has its onselect property to:
Set(varSign,JSON(PenInput1.Image,JSONFormat.IncludeBinaryData));
Set(varSign,Mid(varSign,24,Len(varSign)-24));
SubmitForm(Form_NewIncidentForm);
The onsuccess property of the form is:
accidentattachflow.Run(Form_NewIncidentForm.LastSubmit.ID,varSign);
Notify("Your report has been successfully submitted!",NotificationType.Success,5000);
ResetForm(Form_NewIncidentForm);
Navigate(Screen_WelcomeScreen)
The flow on powerautomate has the ID as "ask in powerapps" triggerbody()['AddAttachment_ID']
for file content it has Base64toBinary(triggerbody()['AddAttachment_FileContent']

Report
All responses (
Answers (