cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

thanks for the help, am getting this error message,

Capture.PNG

 

This the code for my button:

Set(varJson,JSON(PenInput1.Image,JSONFormat.IncludeBinaryData));Set(varJson,Mid(varJson,24,Len(varJson)-24));Patch(Consents,Defaults(Consents),{Title:DataCardValue41.Text,MacAddress:DataCardValue43.Text,SerialNumber:DataCardValue44.Text,EmployeeID:DataCardValue45.Text,ReportDate:DateValue1.SelectedDate,ScannedBy:DataCardValue51.Text});Signature.Run(varJson);

22.PNG

 

 

Highlighted
Solution Supplier
Solution Supplier

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

Because you are not using the SubmitForm function, therefore you cannot use the form1.LastSubmit.ID. Basically you have not submitted your form, so there is nothing in LastSubmit.

1- Instead of the Patch function, simply use SumbitForm(Form1). When you have simple forms like this, always use SubmitForm instead of the Patch function.

2- The second mistake is where you are passing the PenInput1 to your flow. you Created the JSON variable, you need to pass that variable as your File Content. In my example, I named my variable as glbMyPenInputSharePointAttachement4.PNG

 

View solution in original post

Highlighted
Helper II
Helper II

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

 

 

got big red message from my phone: the requested operation is invalid.

server response invalid URL:

then long random texts

Highlighted
Solution Supplier
Solution Supplier

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

your Flow is not correct. You create the file within the Add Attachment action. you do not need a separate action of Create File.

it should look like thisSharePointAttachement7.PNG

 

View solution in original post

Helper II
Helper II

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

thanks alot for your time and help 

Highlighted
Regular Visitor

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

Edwin, can I get a copy of your expression for the submit button you have.  Mine looks something like this and I just can't get it to work.

 

Set(mySignature, JSON(PenInputSIG.Image,JSONFormat.IncludeBinaryData));Set(mySignature,Mid(mySignature,24,Len(mySignature) - 24));SubmitForm(EditForm1);Peninput.Run(mySignature)

 

Peninput.Run is the flow I have created, which I also think might be incorrect, although it seems I followed your process for that creation.  Any help is appreciated.  All I am trying to do is submit my filled in form, and attach the signature to the sharepoint list that gets updated.

Highlighted
Solution Supplier
Solution Supplier

Re: How can you know this info (sharepoint id of the list item to attach the file to.)? am trying to use flow sharepoint attachement

here is what I have OnSelect of my form's submit button:

Set(glbMyPenInput,JSON(PenInput1.Image, JSONFormat.IgnoreBinaryData)); 
Set(glbMyPenInput, Mid(glbMyPenInput,24,Len(glbMyPenInput)-24));
SubmitForm(frmMaster);

My form creates an item in a SharePoint list. after the item is created, my flow runs and attaches the pen input to the newly created item in SharePoint.

Therefore, I call my flow on OnSuccess of my form, meaning that the item must be created first in SharePoint and then something gets attached to it.

Here is what I have on OnSuccess of my from. I have passed two parameters to my flow; the ID of the SharePoint item and the JSON content

AttachPenInputToSharePoint.Run(frmMaster.LastSubmit.ID, glbMyPenInput)

  

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,822)