Hi -
I have a sharepoint list that stores each image URL in separate columns. I would like to have a scrollable image gallery show each image from the separate columns in sharepoint list as the user scrolls through the product images.
I think a Lookup function that says If the current slide is equal to 1 then return Column Image1 URL, if the current slide is equal to 2 then return Column Image2 URL and so on. I'm unable to figure out the proper syntax for that. Is anyone familiar with how to accomplish this?
Gallery:
Thank you in advance for the help!
Hi @dihelp ,
I am assuming this is the same list? You would have to hard code it - you did not say which field contained the number, but it would be something like
Switch(
ThisItem.YourNumberField,
1,
Image1,
2,
Image2,
3,
Image3,
. . . . .
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz -
Thank you for your response. There isn't a field that the formula is referencing (I would not think) when a user slides through the image gallery I would like it to show the images from the corresponding sharepoint list column based on the slide #. If I use thisitem.Image1 in the image property it shows all of the images in column Image1 in the gallery which is showing different products which is not desired. I would like it to lookup the product ID then return image1 for the first slide, image2 for the second slide and so on.
On slide 1 it would show the Image1 column image, on slide 2 it would show the Image2 column image and so on.
Thank you for the help its appreciated.
@dihelp ,
Your Product ID is the reference - just use the formula with that reference (you will need to put it in quotes "" if it is Text).
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
I'd like to have it so the gallery shows all of the images for that specific product/SKU/ID Only. The switch function doesn't seem to be giving me the desired result.
I managed to filter the Image1 column to only return images for the product that is being viewed. Now I just need to some how create a collection of column (Image1, Image2, Image3, and so on) to return a carousel of all the product images just for that one SKU. So it is concatenating Image 1, 2, 3, 4 for one Record at a time.
I may not be explaining my question properly or be misunderstanding your answer. I appreciate the help thus far I'm a new user to powerapps.
Example of Record in sharepoint list. Notice how the image URLS are in separate columns. I would like all of these images to appear in one gallery only for the one record.
@dihelp ,
Yes, we are going in circles a bit and you really have not answered many of the questions I have asked. I also cannot see Product ID in the list fields you posted - is this in the same list? The Switch function is no different to an If function chain - just a bit neater.
What I need to know is how you determine which image you want displayed on a particular record. Your structure is also not ideal - you could have all the images in a SharePoint Library with a reference field and simply lookup the Library based on the matching field in the list.
User | Count |
---|---|
250 | |
105 | |
82 | |
51 | |
43 |