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

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
Highlighted
EricLott Resident Rockstar
Resident Rockstar

Re: Fancy Image Randomizer

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
Highlighted
EricLott Resident Rockstar
Resident Rockstar

Re: Fancy Image Randomizer

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

krickard Helper II
Helper II

Re: Fancy Image Randomizer

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

krickard Helper II
Helper II

Re: Fancy Image Randomizer

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

krickard Helper II
Helper II

Re: Fancy Image Randomizer

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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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