Search code examples
powerapps

How generate a list like a gallery that can handle pictures or videos?


I am trying to make an inspection type app and I'm currently using excel tables to generate lists that I pull into collection. The per site data is basically all either pictures videos.

When I put the link using .\folder\folder\pic.png in a column with Image [Image], and use that as the pic source for a gallery, I can see the picture just fine, though it does take a few seconds to display the image. However, the videos don't show up at all, presumably because the [Image] tagging doesn't automatically pull a thumbnail from the video.

So how can I generate a gallery, or something like it, that can dynamically handle either a picture or a video?


Solution

  • In your gallery, add both an Image control and a Video control. Then set the visibility of each depending if ThisItem is an image or video (by looking at the file extension as an example).