cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Patron
Post Patron

Camera image duplicates for each Gallery item

Hello Power Apps Community,

Scenario: I am creating a page where you can take a picture of various items - within a Gallery.

Issue: I can capture an image, however when I take images of more Gallery items, the images are replicated for all items - as seen below.

I would appreciate any help 🙂

ImageExample.JPG

Thank you in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Post Patron
Post Patron

For anyone who comes across this, I managed to solve this by doing the following:

Create a Collection for your images being taken:

Collect(CameraPhoto, {Photo: Camera.Stream, FileName: Title.Text});

On the Gallery (Items), use AddColumns to add the Collection:

AddColumns('SP List', "FilePhoto", LookUp(CameraPhoto, FileName = Name, Photo))

 Then add the following to your Image control:

ThisItem.FilePhoto

View solution in original post

7 REPLIES 7
Super User III
Super User III

The image usually takes one of the columns in your table.

If the images are not in a table but saved locally in your app, then try the local table below:

Set( MyImagesTable,
Table(
{ ImageColumn:MyPic1},
{ ImageColumn:MyPic2},
{ ImageColumn:MyPic3}
))
 
So on your Gallery items put MyImagesTable, then the Image within the Gallery ImageColumn
------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24

The Items property of my Gallery is referencing a SharePoint list which provides the product names. I get an error message when I add the additional formula - that you kindly provided, to the Items property of the Gallery. 

Error: Behavior function in a non-behavior property.

Please clarify for me.

You dont have a column for Image for the Sharepoint List and you want to add it now?

If  so then for each image you take, update the Sharepoint list image column.

 

Or Create a Collection that combines the image and the existing sharepoint list

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

Correct, I do not have a column in my list to store the image, but I would like to add it.

The Gallery is referencing a list that holds the Master list of products, and the list that I would like to Patch to is a different SP list (for transaction type data) - which is where the image column is. 

SP List 1: Master Products List

SP List 2: Patching transaction based data to

Gallery: Referencing SP List 1 in terms of products. But the additional info being captured such as the image must go to SP List 2 - along with the associated product name. 

So for each image you take, update the sharepoint column.

https://youtu.be/2QeOILfo1Bw?t=3

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

I followed the steps identified in the video but unfortunately it did not resolve the issue.

When I stored the photo's taken in a Collection, I get the following:

ImageExample.JPG

When I Patch the collection to SharePoint, the column where the image is meant to populate remains blank.

I have tested this outside a Gallery and got it right - by assigning each Image item a variable, but this is not a sustainable solution. 

Post Patron
Post Patron

For anyone who comes across this, I managed to solve this by doing the following:

Create a Collection for your images being taken:

Collect(CameraPhoto, {Photo: Camera.Stream, FileName: Title.Text});

On the Gallery (Items), use AddColumns to add the Collection:

AddColumns('SP List', "FilePhoto", LookUp(CameraPhoto, FileName = Name, Photo))

 Then add the following to your Image control:

ThisItem.FilePhoto

View solution in original post

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (3,743)