Skip to content

Generate 4 digit random number using Power Automate

In this blog, we will understand how to generate 4 digit random number in Power Automate. (MS Flow)

Understand how to use rand() function in Power Automate.

Steps to be followed:

  1. Add Compose action.
  1. Go to Expression and search for rand() and select that.
  1. rand() function requires two-parameter of type integer.
  • rand(minValue, maxValue)
  • it returns a random integer from a specified range, which is inclusive only at the starting end.
  1. To get 4 digit random number we will enter below values:
  • minValue: 1000
  • maxValue: 10000

It will return random numbers between 1000 to 10000.(it will exclude 10000 maxValue)

Output:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments