This is a component designed to generate random number every time the component is reset.
Let's take a look at the component.
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.
1) Result : Returns the generated random number.
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.