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

Picture Card: not data card value!!

Hi everyone,

 

I have an app connected to a sharepoint list

 

While using the app, I realised that I forgot to add a column for pictures. So I created this new column in my sharepoint list, and then back in my app I refreshed and this new field

 

Now the problem is that when I run the app, I can see the title ¨Picture” but there is nothing else to insert a photo. Then I went to my Tree...and I saw that the picture data card doesn’t have a “data card value” to insert responses. 

 

Does anyone know how to fix this? Thanks 🙂

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Picture Card: not data card value!!

Hi @Corleone ,

Could you please share a bit more about the data type of the Picture field in your SP List? Is it a Image Type column or a Hyperlink type column?

 

Based on the issue that you mentioned, I think the Picture field is Image type field, is it right? Currently, within PowerApps app, if you added a Image Type or Hyperlink type field in your SP List data source, the Image Type or Hyperlink type would not generate "Add Picture" control within the Edit form.

 

In addition, if you want to save image data back to your SP List column, the Image Type field or Hyperlink type field could not achieve your needs. As an alternative solution, I think the "Multiple Lines of Text" type column could achieve your needs. On your side, please create a "Multiple Lines of Text" type column as below:

6.JPG

 

Then within your Edit form screen, add a "Add Picture" control under the Edit form. Then you could use this "Add Picture" control to capture image file for your current new entry.

7.JPG

Set the OnSuccess property of the Edit form to following:

Patch(                         // Save image data back to Multiple Lines Of Text field in your SP list
      'Your SP List', 
       EditForm1.LastSubmit, 
       {
          PictureUpload: Substitute(
                                     JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData),
                                     """", 
                                     ""
                         )
       }
);
Reset(AddMediaButton1);  // Reset the "Add Picture" control
Back()

Note: The PictureUpload represents the Multiple Lines of Text type column in your SP List, you should replace it with actual column name from your SP List. The Above Patch function would be executed once your Edit form has been submitted successfully.

 

Set the Image property of the UploadedImage1 control to following:

If(
   IsBlank(AddMediaButton1.Media), 
   BrowseGallery1.Selected.PictureUpload,    //replace the PictureUpload with actual field name from your SP List
   AddMediaButton1.Media
)

8.JPG

 

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

 

Please check and see if the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Easy-Way-to-uploaded-pics-to-sharepoint-from...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Uploading-images-to-SharePoint-list-without-...

 

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

3 REPLIES 3
Highlighted
Community Champion
Community Champion

Re: Picture Card: not data card value!!

Hi @Corleone ,

There are three ways you can store an image in SharePoint

  • In a Library
  • In an attachment to a List
  • In a multi-line text field (which requires some coding to get in and out) - I don't think you want that one.

Have you used the Hyperlink or Picture field type and do you actually want to store a picture?

Highlighted
Community Support
Community Support

Re: Picture Card: not data card value!!

Hi @Corleone ,

Could you please share a bit more about the data type of the Picture field in your SP List? Is it a Image Type column or a Hyperlink type column?

 

Based on the issue that you mentioned, I think the Picture field is Image type field, is it right? Currently, within PowerApps app, if you added a Image Type or Hyperlink type field in your SP List data source, the Image Type or Hyperlink type would not generate "Add Picture" control within the Edit form.

 

In addition, if you want to save image data back to your SP List column, the Image Type field or Hyperlink type field could not achieve your needs. As an alternative solution, I think the "Multiple Lines of Text" type column could achieve your needs. On your side, please create a "Multiple Lines of Text" type column as below:

6.JPG

 

Then within your Edit form screen, add a "Add Picture" control under the Edit form. Then you could use this "Add Picture" control to capture image file for your current new entry.

7.JPG

Set the OnSuccess property of the Edit form to following:

Patch(                         // Save image data back to Multiple Lines Of Text field in your SP list
      'Your SP List', 
       EditForm1.LastSubmit, 
       {
          PictureUpload: Substitute(
                                     JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData),
                                     """", 
                                     ""
                         )
       }
);
Reset(AddMediaButton1);  // Reset the "Add Picture" control
Back()

Note: The PictureUpload represents the Multiple Lines of Text type column in your SP List, you should replace it with actual column name from your SP List. The Above Patch function would be executed once your Edit form has been submitted successfully.

 

Set the Image property of the UploadedImage1 control to following:

If(
   IsBlank(AddMediaButton1.Media), 
   BrowseGallery1.Selected.PictureUpload,    //replace the PictureUpload with actual field name from your SP List
   AddMediaButton1.Media
)

8.JPG

 

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

 

Please check and see if the following threads would help in your scenario:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Easy-Way-to-uploaded-pics-to-sharepoint-from...

https://powerusers.microsoft.com/t5/Building-Power-Apps/Uploading-images-to-SharePoint-list-without-...

 

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

Highlighted
Community Champion
Community Champion

Re: Picture Card: not data card value!!

Hi @Corleone ,

If you want to head down the Multi-line Text storage path (one picture per field), you need to follow the advice of @v-xida-msft .

If not, I can give you some guidance on Library and attachment options.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (10,422)