cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krickard
Helper III
Helper III

Fancy Image Randomizer

I've built a swag randomizer that shows a random image from a pool of images based on a button push using this code below. 

 

Image formula

Switch(Value(lbRandomNumber_1.Text),1,Pic1,2,Pic2,3,Pic3)

 

Button formula

Set(gvIMG, Rand());

 

Currently it's push a button... get a random image back. I'd like to make it fancier. I'm trying to replace a prize wheel that would be used say, at a conference booth, so I'd like the images to randomize quickly at first and then slow down until a single random image is finally displayed. Is this possible?

 

The scenario... 6 different swag gifts... some are more valuable therefore they should appear less, some are cheap so they should appear more often... push the button and the image quickly runs through the 6 images and then lands on a single image.  

1 ACCEPTED SOLUTION

Accepted Solutions
EricLott
Community Champion
Community Champion

Check out this sample app from @h-nagao , it's got some of the fundamentals you'll need.

https://powerusers.microsoft.com/t5/Community-App-Samples/Simple-Roulette-app/td-p/420440

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

View solution in original post

4 REPLIES 4
EricLott
Community Champion
Community Champion

Check out this sample app from @h-nagao , it's got some of the fundamentals you'll need.

https://powerusers.microsoft.com/t5/Community-App-Samples/Simple-Roulette-app/td-p/420440

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up.

I see the .msapp file in that link provided. But how do I import a .msapp file in PowerApps? Import seems to require a zipped file, not a .msapp file. 

 

Nevermind... I found this https://powerusers.microsoft.com/t5/Building-Power-Apps/How-to-import-msapp-file/td-p/134261

The simple roulette app is really cool. I was hoping to use the images though. 

I didn't realize it at first until I studied the code a little more... But there is code in this roulette app that I can replace the text with an image and it does exactly what I want it to do. Thanks @EricLott 

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (2,398)