Skip to main content
Microsoft logo
Power Apps
    • AI Builder
    • Automate processes
    • Azure + Power Apps
    • Build apps
    • Connect data
    • Portals
  • Pricing
    • Overview
    • Become a Partner
    • Find a Partner
    • Find partner offers
    • Partner GTM Resources
    • Blog
    • Customer stories
    • Developer Plan
    • Documentation
    • For IT Leaders
    • Roadmap
    • Self-paced learning
    • Webinars
    • App development topics
    • Overview
    • Issues
    • Give feedback
    • Overview
    • Forums
    • Galleries
    • Submit ideas
    • User groups
    • Register
    • ·
    • Sign in
    • ·
    • Help
    Go To
    • Power Apps Community
    • Welcome to the Community!
    • News & Announcements
    • Get Help with Power Apps
    • Building Power Apps
    • Microsoft Dataverse
    • AI Builder
    • Power Apps Governance and Administering
    • Power Apps Pro Dev & ISV
    • Power Apps Portals
    • Connector Development
    • Power Query
    • Power Platform Integration - Better Together!
    • Power Platform Integrations
    • Power Platform and Dynamics 365 Integrations
    • Community Blog
    • Power Apps Community Blog
    • Galleries
    • Community Connections & How-To Videos
    • Community App Samples
    • Webinars and Video Gallery
    • Canvas Apps Components Samples
    • Kid Zone
    • Business Value Webinars and Video Gallery
    • Emergency Response Gallery
    • 2021 MSBizAppsSummit Gallery
    • 2020 MSBizAppsSummit Gallery
    • 2019 MSBizAppsSummit Gallery
    • Ideas
    • Power Apps Ideas
    • Community Engagement
    • Demo Extravaganza 2021
    • Demo Extravaganza - Components 2021
    • Power Apps Community Demo Extravaganza 2020
    • Experimental
    • Error Handling
    • Power Apps Experimental Features
    • Community Support
    • Community Accounts & Registration
    • Using the Community
    • Community Feedback
    cancel
    Turn on suggestions
    Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
    Showing results for 
    Search instead for 
    Did you mean: 
    • Power Apps Community
    • Galleries
    • Canvas Apps Components Samples
    • Random Number Generator

    Random Number Generator

    07-03-2020 07:28 AM

    agarwalritika
    Regular Visitor
    959 Views
    LinkedIn LinkedIn Facebook Facebook Twitter Twitter
    agarwalritika
    agarwalritika
    Regular Visitor
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    Random Number Generator

    ‎07-03-2020 07:28 AM
    This is a component designed to generate random number every time the component is reset.
     
    More about Implementation: https://www.agarwalritika.com/post/generate-random-number-otp-authentication-in-canvas-apps
     
    Let's take a look at the component.
     
    Input Properties:
    1) Length : Number - The length of random number as output.
    2) Show OTP : Boolean - Show/Hides the OTP - By default this is false.
    3) TextColor : Color - If the "Show OTP" is set to true, then the color of text.
     
    Output Properties:
    1) Result : Returns the generated random number.
     
    Component -> OnReset
    Expression: Set(RandomNumber,Value(Text(Mod(Rand()*Power(100,'OTP Generator'.Length),Power(10,'OTP Generator'.Length)-1),"[$-en-US]#0")))
     
    Explanation: The above expression generates a number based on "Length" parameter and stores it in a variable which is then returned through the "Result" Output Property. 'OTP Generator' is the name of the component.
    OTP Generator.msapp
    Labels:
    • Labels:
    • Components
    Message 1 of 3
    959 Views
    2 Kudos
    Reply
    • All posts
    • Previous Topic
    • Next Topic
    Anonymous
    Not applicable
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎08-17-2020 12:44 AM

    Hi

    After loading the component and OnSelect button I am getting the below error

    Invocation of Unknown or Unsupportive function for the below line

    Office365Outlook.SendEmailV2(TextInput1_1.Text,"OTP for Authentication","The OTP is "&RandomNumberGenerated);

     

    Regards

    Sudhakar

    Message 2 of 3
    883 Views
    0 Kudos
    Reply
    LR4
    LR4
    New Member
    • Mark as New
    • Bookmark
    • Subscribe
    • Mute
    • Subscribe to RSS Feed
    • Permalink
    • Print
    • Email to a Friend
    • Report Inappropriate Content

    ‎02-10-2022 07:55 AM

    Hi, can you advise if this RNG is independently verified & certified to be random. I'm trying to find out which Microsoft RNG methods are certified as random and 3rd party tested in order to decide which to use for a prize draw solution in our new system we are building

    Thanks

    Message 3 of 3
    249 Views
    0 Kudos
    Reply

    Power Platform

    • Overview
    • Power BI
    • Power Apps
    • Power Automate
    • Power Virtual Agents

    Power Apps

    • Sign in
    • Sign up

    Browse

    • Sample apps
    • Services

    Downloads

    • Studio
    • iOS
    • Android

    Learn

    • Documentation
    • Support
    • Community
    • Give feedback
    • Blog
    • Partners

    • © 2022 Microsoft
    • Follow Power Apps
    • Privacy & cookies
    • Manage cookies
    • Terms of use
    • Trademarks