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 / Shoutouts Canvas App -...
Power Apps
Unanswered

Shoutouts Canvas App - Patch image to SharePoint List as item Attachment

(0) ShareShare
ReportReport
Posted on by 48

Hi all,

 

Currently using the Shoutouts canvas app and have migrated the data collected to a SharePoint List.

 

I would like to have the images uploaded in a shoutout to be added to the SharePoint list item as an attachment and then be shown in the activity feed screen when clicking the show photo button.

 

Any help would be greatly appreciated! 

 

2021-06-18 14_52_17-Window.png

 

 

 // Write to data source
 Patch(Shoutouts, Defaults(Shoutouts),
 {
 Title: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")), 
 CreatorEmail: _myProfile.UserPrincipalName, 
 PrimaryID: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")), 
 CreatedOnDateTime: Text(Now(),"[$-en-US]dd/mm/yyyy hh:mm AM/PM"), 
 ShoutoutType: _selectedShoutout.Type, 
 RecipientEmail: _selectedUser.UserPrincipalName, 
 Image: UploadedImage1.Image, 
 CreatorName: _myProfile.DisplayName, 
 RecipientName: _selectedUser.DisplayName, 
 Message: MessageInputBox.Text
 }

 

 

2021-06-18 14_56_53-Window.png

 

//ThisItem.Image is a unique string identifier for the particular row's image. If showing the image, add the string to the _shownImagesActivity variable, otherwise remove it
If(ThisItem.Image in _shownImagesActivity, Set(_shownImagesActivity, Substitute(_shownImagesActivity, ThisItem.Image, "")), Set(_shownImagesActivity, _shownImagesActivity & ThisItem.Image))

 

 

2021-06-18 15_00_52-Window.png

 

 

ThisItem.Image

 

 

Categories:
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    If you want to add a attachment to a SP list item using Patch function directly, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    Thanks for providing that information.

     

    Is there any other way to get this to work with a sharepoint list? Doesn't have to be as an attachment, just any way of storing the image in the sharepoint list and viewing it in the Shoutouts activity feed? 

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    There should be an Image column in your SP list which could be used to store the image uploading via Patch function, the original patch formula:

    // Write to data source
     Patch(Shoutouts, Defaults(Shoutouts),
     {
     Title: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")), 
     CreatorEmail: _myProfile.UserPrincipalName, 
     PrimaryID: Value(Text(Now(), "[$-en-US]yyyymmddhhmmss")), 
     CreatedOnDateTime: Text(Now(),"[$-en-US]dd/mm/yyyy hh:mm AM/PM"), 
     ShoutoutType: _selectedShoutout.Type, 
     RecipientEmail: _selectedUser.UserPrincipalName, 
     Image: UploadedImage1.Image, //This is uploading an image to Image column
     CreatorName: _myProfile.DisplayName, 
     RecipientName: _selectedUser.DisplayName, 
     Message: MessageInputBox.Text
     }

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    I've got a "Image" column in my sharepoint list, however if I have the column type as a image type column it is not detected when trying to patch to it (error appears in the code above saying the column does not exist).

     

    Changing the column type to multiple lines of text allows it to be detected and allows patching to it, however "appres://blobmanager/xxxxx" is what is patched to it and the image is not viewable in the list or in the shoutouts app. 

     

    Apologies I'm fairly new to powerapps, so I'm probably doing something simple wrong.

     

    Thanks for your help so far!

  • R Bakker Profile Picture
    725 on at

    Reza has a good video on saving photo as attachments, I have made it work with the image control too.

     

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

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    Actually "appres://blobmanager/xxxxx" could be displayed in an Image control in Power Apps:

    vjefferni_0-1624343296033.png

     

    It just could not be displayed in a SharePoint list as an picture.

     

    Could you please test and show me what's in the list Image column if you have uploaded an image with the App?

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

     

     

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    This is what's in the sharepoint list image column:

    ​appres://blobmanager/6a292ea042c444ffaa2251b7a26f2616/174

     

     

     

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Powerapps_Dan ,

     

    I have made a test and confirmed that it could be displayed in Power Apps Image control:

    vjefferni_0-1624346515891.png

    vjefferni_1-1624346570003.png

     

    Have you refreshed the SharePoint list connection in Power Apps studio after changing the column type? If no, please have a try and test it again.

    vjefferni_2-1624346741522.png

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

     

  • Powerapps_Dan Profile Picture
    48 on at

    Hi @v-jefferni ,

     

    Unfortunately still no luck, I've refreshed the data source and the images are still not coming through.

     

    2021-06-24 10_50_07-Blue Bus Shoutouts - Saved (Unpublished) - Power Apps.png2021-06-24 10_51_38-Blue Bus Shoutouts - Saved (Unpublished) - Power Apps.png

     

     

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 224 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 189 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 126

Last 30 days Overall leaderboard