cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
loubou
New Member

Random number fct

Hi guys! 

 

I am currently building an app to learn some German Vocabulary. Basically, my app is linked to an excel with all my vocabulary, where each word has an ID, as with a database. To create a quiz, I need five random ID for five random words. I do it using five label boxes and the following code: 

First(Shuffle (Verbes.ID)).ID
However, when my first set of 5 questions is over, I do not know how to "refresh" those five label boxes without closing and opening again the app. Can someone please help me?

 

Thank you in advance! 

1 ACCEPTED SOLUTION

Accepted Solutions
Dual Super User
Dual Super User

Re: Random number fct

for the button that gets the next set of questions add formulas that set 5 different variables to random numbers.  Something like this:

Set(var1,Rand()*100);Set(var2,Rand()*100);Set(var3,Rand()*100);Set(var4,Rand()*100);Set(var5,Rand()*100)

Use the values in the variables for the IDs for each question.  Each time you press the button you will get 5 new random numbers.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

1 REPLY 1
Dual Super User
Dual Super User

Re: Random number fct

for the button that gets the next set of questions add formulas that set 5 different variables to random numbers.  Something like this:

Set(var1,Rand()*100);Set(var2,Rand()*100);Set(var3,Rand()*100);Set(var4,Rand()*100);Set(var5,Rand()*100)

Use the values in the variables for the IDs for each question.  Each time you press the button you will get 5 new random numbers.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

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!

Top Solution Authors
Top Kudoed Authors
Users online (6,053)