Gallery
Random & Random Integer
Share
Explore

icon picker
Random & Random Integer

Formulas: Random() and RandomInteger()
Category: Math
ask-question.svg
Random()
Returns a random number
or stated otherwise...
Hey Coda, will you please generate a random number below 1 (.99 and below) for me? I may or may not want you to update this number for every doc edit.
variable (1).svg
RandomInteger()
Returns random number between two numbers
put a bit simpler...
Hey Coda, will you generate a random number that falls between these two numbers. I may or may not want you to update this number for every doc edit.

Random() and RandomInteger() share one parameter. RandomInteger() has two additional parameters:
approve-and-update (2).svg
UpdateContinuously

Random(UndateContinuously)

Whether or not to have the random value update every time an edit is made on the doc; True or False.
eiffel-tower.svg
High

RandomInteger(High, Low, UpdateContinuously)

The highest possible number that can be genearated.
low-priority.svg
Low

RandomInteger(High, Low, UpdateContinuously)

The lowest possible number that can be generated.


Random() and RandomInteger() will likely be used a bit less than other formulas. One major difference between the two is that Random() returns random numbers between 0 and .99, while RandomInteger() will return any whole number between the numbers you designated in the High and Low parameters.

Give Me New Numbers!

ask-question (1).svg
0.35555942144966596
variable.svg
159

Notice how the button changes every time you hit the button...that’s the UpdateContinuously parameter at work! That parameter is marked as “True” in both instances. But what happens when it’s false? Here’s the same table again, but this time with an option to toggle that parameter!

Give Me New Numbers!
UpdateContinuously = False
UpdateContinuously = True

ask-question (1).svg
0.6772235902237118
variable.svg
678

Let’s move to our activities to see some use cases for these formulas!


Done
Use the new formulas to fill columns in a sample database
Done
Done
Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.