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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,757)