web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / OnSuccess use LastSubm...
Power Apps
Unanswered

OnSuccess use LastSubmit.ID and AddAttachmenttoSharePointItem.Run... failed: The method 'Run' has an invalid value for parameter 'Addattachment_Id'

(0) ShareShare
ReportReport
Posted on by 52

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']

 

Categories:
  • BrianS Profile Picture
    2,407 Super User 2024 Season 1 on at

    It could be that your flow is processing the ID as an incorrect data type. How does the flow process the ID from Powerapps?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 354 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 320

#3
Mohsin Ali Profile Picture

Mohsin Ali 246

Last 30 days Overall leaderboard