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

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (40,069)