Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Random number fct

(0) ShareShare
ReportReport
Posted on by 6

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! 

  • Verified answer
    Pstork1 Profile Picture
    Pstork1 64,942 on at
    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.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard