Formatting Random Number Generator Plugin Results

I am trying to generate a random number as whole number. I have used two plugins to attempt this but get the following results. Random Number Generator Plugin produces a number as a decimal. Unique Random Numbers Generators produces an array of numbers.

Is there a way to modify or format the plugin results?

You could:

Thank you for the suggestion, not quite what I was looking for but will be handy for other situations.

Hi there, @jlohr.may… I rarely use plugins, so I don’t know if you can format the plugin results. However, if you don’t want to use a plugin, you can generate a random number as an integer in a range by using the method shown in the example in this post by @adamhholmes.

For your use case, the method would look something like the following. When the Generate button is clicked, trigger a custom event.

The first action in the custom event sets a custom state to a number by using the built-in Calculate formula operator to generate a random string with a maximum length of the number of characters in the max value of the range, and the calculated string is then converted to a number.

The second action in the custom event schedules another custom event to run only when the custom state’s value is less than the range’s minimum value or greater than the range’s maximum value.

The second custom event is exactly the same as the first one, except the second step schedules the first custom event to run with the same Only when condition, therefore creating a loop that will run until an integer that is within the specified range is generated.

Anyway, maybe this suggestion won’t quite be what you are looking for, either, but your post made me think of the method in Adam’s post (which I didn’t know existed before he mentioned it in that post), and I wanted to see if I could do what you described by using that method.

Hope this helps.

Best…
Mike

Thank you for the help @mikeloc! I was not able to figure it out using the method you shared but that’s due to my limited knowledge and experience. Your post did help me understand custom states better so thanks. However, I did find a solution within the plugin:

In the Rich Text Editor (I don’t know the exact name of this setting) it allows you to formatted by decimal etc.

Polyhedra’s “Get Random Integer(s)” action is exactly what you were looking for but whatevs.