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

Update new created SharePoint list item with new created Sharepoint file url

Hello,

I have a PowerApp that asks user for name and then for signature, and all goes as new list item and new *.jpg for signature.

How to update new created SharePoint list item with new created Sharepoint file url

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @fishbicki ,

Where do you store the signature image for the new List Item? Within SP Library or add it as attachment of the List Item?

Do you want to update one column of the New Created List Item with created SP File Url?

 

If you store the signature image for the new List Item as attachment, Please consider take a try with the following workaround:

Set OnSuccess property of the Edit form to following:

Patch(
      'SP List',
      EditForm1.LastSubmit,
      {
        FileUrlColumn: First(EditForm1.LastSubmit.Attachments).AbsoluteUri
      }
);
Back()

Note: I assume you submit new List Item to your SP List using SubmitForm function

 

If you do not use Edit form to collect your entry, you could consider pass these entered value to a Power Automate flow. Within the flow, add a "Create Item" action of SP List to create new item in your SP List based on the passed name value. Then add a "Create file" action of SP List to create a file in your SP Library based on the passed signature image data (encoded base64). Then add a "Update Item" action of SP List to update the file url of the created signature image file to the specific column in your SP List.

The flow's configuration looks like below:

12.JPG

 

13.JPG

 

14.JPG

Within "Create file" action, File Content field set to following expression:

dataUriToBinary(outputs('SignatureContent'))

 

Within your app, create a connection to above flow, then you need to execute the following formula:

'Flow Name'.Run(
                NameTextInput.Text,     // parameter value passed to flow for creating new item
                Substitute(JSON(PenInput1.Image, JSONFormat.IncludeBinaryData),"""","")  // signature base64 encoded content needs to be passed to flow for creating image file in SP library
)

 

More details about firing a flow from a canvas app, please check the following video:

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

More details about uploading image files from canvas app to SP library through Power Automate flow, please check the following videos:

https://www.youtube.com/watch?v=kQVYid1p_vA

https://www.youtube.com/watch?v=UYK7yruBHDM

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @fishbicki ,

Where do you store the signature image for the new List Item? Within SP Library or add it as attachment of the List Item?

Do you want to update one column of the New Created List Item with created SP File Url?

 

If you store the signature image for the new List Item as attachment, Please consider take a try with the following workaround:

Set OnSuccess property of the Edit form to following:

Patch(
      'SP List',
      EditForm1.LastSubmit,
      {
        FileUrlColumn: First(EditForm1.LastSubmit.Attachments).AbsoluteUri
      }
);
Back()

Note: I assume you submit new List Item to your SP List using SubmitForm function

 

If you do not use Edit form to collect your entry, you could consider pass these entered value to a Power Automate flow. Within the flow, add a "Create Item" action of SP List to create new item in your SP List based on the passed name value. Then add a "Create file" action of SP List to create a file in your SP Library based on the passed signature image data (encoded base64). Then add a "Update Item" action of SP List to update the file url of the created signature image file to the specific column in your SP List.

The flow's configuration looks like below:

12.JPG

 

13.JPG

 

14.JPG

Within "Create file" action, File Content field set to following expression:

dataUriToBinary(outputs('SignatureContent'))

 

Within your app, create a connection to above flow, then you need to execute the following formula:

'Flow Name'.Run(
                NameTextInput.Text,     // parameter value passed to flow for creating new item
                Substitute(JSON(PenInput1.Image, JSONFormat.IncludeBinaryData),"""","")  // signature base64 encoded content needs to be passed to flow for creating image file in SP library
)

 

More details about firing a flow from a canvas app, please check the following video:

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

More details about uploading image files from canvas app to SP library through Power Automate flow, please check the following videos:

https://www.youtube.com/watch?v=kQVYid1p_vA

https://www.youtube.com/watch?v=UYK7yruBHDM

 

Please take a try with above solution, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,041)