cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HectorOlivos
Helper I
Helper I

Image Carousel from image library

Hello Community!

 

I have an image library 

 

HectorOlivos_0-1661186990702.png

 

 

I just wanted to know if its possible to create an image carousel from an image library that scrolls through the images every "x" seconds.

 

Thanks. 

 

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
RandyHayes
Super User
Super User

@HectorOlivos 

Yes, do the following:

On the OnVisible action of your screen, add the following formula:

Set(glbImages, yourImageLibrary);
Set(glbImageNumber, 1)

 

Add an image control and set the Image property to:

Index(glbImages, glbImageNumber).Thumbnail.Small

(or other size you want)

 

Add a timer control to your screen and set the duration to the time you want.  The autorepeat set to true and the autostart set to true.

In the OnTimerEnd action, set the formula to:

Set(glbImageNumber, If(glbImageNumber = CountRows(glbImages), 1, glbImageNumber + 1))

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

RandyHayes
Super User
Super User

@HectorOlivos 

So the large thumbnail will give the highest resolution available.  You can alter the Image Position property of the image to change from Fit or Stretch or any other option that might help.

 

However...beyond that, keep in mind that SharePoint automatically generates the thumbnail images (small, medium and large).  So, you don't really have any control over that aspect of the thumbnail.

 

If you need the full file (and not the thumbnail), then substitute .'Link to Item' in your formula instead of the .'ThumbNail ({Thumbnail})' part.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

6 REPLIES 6
RandyHayes
Super User
Super User

@HectorOlivos 

Yes, do the following:

On the OnVisible action of your screen, add the following formula:

Set(glbImages, yourImageLibrary);
Set(glbImageNumber, 1)

 

Add an image control and set the Image property to:

Index(glbImages, glbImageNumber).Thumbnail.Small

(or other size you want)

 

Add a timer control to your screen and set the duration to the time you want.  The autorepeat set to true and the autostart set to true.

In the OnTimerEnd action, set the formula to:

Set(glbImageNumber, If(glbImageNumber = CountRows(glbImages), 1, glbImageNumber + 1))

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
HectorOlivos
Helper I
Helper I

Thanks for the Help @RandyHayes, but i still got an issue, 

 

I set the OnVisible as

 

Set(glbImages, Images);
Set(glbImageNumber, 1)

 

The images are not loading into the media control 

HectorOlivos_0-1661189179630.png

 

Though the current language of the library is in english, it changes from 'Thumbnail'.Large to 'Miniatura'.Large  but i added a column named Thumbnail as an Hyperlink type showing the preview of the image. 

 

Index(glbImages, glbImageNumber).Miniatura.Large

 

HectorOlivos_1-1661189444924.png

 

RandyHayes
Super User
Super User

@HectorOlivos 

Yes, so you will not be able to use that particular column directly, but it should still have a Thumbnail column on it.

See if you have a 'Thumbnail ({Thumbnail})' column available to you when you type the period after the Index closing paren.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
HectorOlivos
Helper I
Helper I

Now it´s done. Thanks for the help.

 

Is there an option to get the image in a better resolution to fit screen? 

HectorOlivos_0-1661195047141.png

 

 

 

RandyHayes
Super User
Super User

@HectorOlivos 

So the large thumbnail will give the highest resolution available.  You can alter the Image Position property of the image to change from Fit or Stretch or any other option that might help.

 

However...beyond that, keep in mind that SharePoint automatically generates the thumbnail images (small, medium and large).  So, you don't really have any control over that aspect of the thumbnail.

 

If you need the full file (and not the thumbnail), then substitute .'Link to Item' in your formula instead of the .'ThumbNail ({Thumbnail})' part.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
NOTE: My normal response times will be Mon to Fri from 1 PM to 10 PM UTC (and lots of other times too!)
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
HectorOlivos
Helper I
Helper I

Thanks again, Link to item did the job 🙂

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (1,903)