Forum Documentation Showcase Pricing Learn more

[SOLVED] Assign random # to a thing


#1

Im trying to think of a way to do this. do i need to upload a list of numbers myself and then use Number= Number list:random item? or is there a way to populate this in bubble? also how would i go about making sure that a number doesnt get used twice? thanks!


Blockspring: Randomly Generated Number
#2

The simplest way would be to create the list in Excel and upload it as CSV to a data type.
You could also use BlockSpring - they have several random number/string generators, and it is really easy to integrate with those. A random string/id generated this way would be almost certain to be unique each time.


#3

Yes! A random generator from blockspring works perfectly! thank you so much!!


#4

Reminded me of something I made for kicks. I think I used BlockSpring to generate the numbers. I just wanted to note that you can get the same sequence of random numbers when called twice on the same page. http://lotterytraining.scottrefug.io/


#5

how long do you think it will take me to get my numbers to match? haha
cool app man! I ended up using a 26 character alpha numeric string so i think the chances of a match are pretty low!


Using a code as login
#6

Your chances of hitting the same string are 1 in 5.9e40 (37^26).

Pretty good, I’d say. For reference, the Earth is made of 1.3e50 atoms.


#7

If every atom in the universe was a monkey with a typewriter, typing since the big bang, there is still only a 1 in a trillion chance one of them would have typed this.

Is this a fairly simple Blockspring call ? I would like to add it to my Bubble Patterns project.


#8

yes i was surprised how simple it was. https://open.blockspring.com/bs/random-alphanumeric-string


#9

Rechecked my work, I didn’t use BlockSpring, but Bubble’s builtin random item on a list. Irrelevant to this discussion, but to get a random selection on a list, I had to perform it twice on a particular list; otherwise, the 2nd list ends up looking like the 1st one. I assume that they had the same seed (if any).


#10

Scott, we’ll gladly look into it if you think it’s a bug - it should work properly the first time.
If you think it’s a bug, fill out the form https://bubble.is/bug_report and we’ll look at it.


#11

Actually, it was showing a randomly generated list the firs time. The issue was that since I’m generating two lists on the same page at the same time, the lists ended up being exactly the same. All I did was randomly sort the 2nd list a second time so it was different from the 1st list.


#12

http://lotterytraining.scottrefug.io/1

Nice app! Have you thought in monetize it (ex. adwords)?


#13

Wonderful and great for reading. The essay writing service reviews is participating in writing the papers.


#14

This post was flagged by the community and is temporarily hidden.