# Adding continuing range then selecting a random number

**URL:** <https://forum.bubble.io/t/adding-continuing-range-then-selecting-a-random-number/283701>\
**Category:** Need help\
**Created:** [September 17, 2023, 10:39am UTC](https://forum.bubble.io/t/adding-continuing-range-then-selecting-a-random-number/283701 "2023-09-17T10:39:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![loconft2](https://avatars.discourse-cdn.com/v4/letter/l/f1d935/32.png) [@loconft2](https://forum.bubble.io/u/loconft2)\
**Post date:** [September 17, 2023, 10:39am UTC](https://forum.bubble.io/t/adding-continuing-range-then-selecting-a-random-number/283701/1 "2023-09-17T10:39:14Z")

</div>

Hi Bubble guys and gals,

I need to create the following workflow.

User selects a number of entries (numeric value) against a listing (listing ID).

Once entered I need to populate an entry database with the following structure

User - Current user  
Listing - Listing ID  
Entry range - last number (1 if blank) - (plus number of entries)

Example (User is the first to enter on specific listing and buys 5 entries)

User - Joe Bloggs  
Listing - 123456  
Entry range - 1 - 5

Once this database structure is in place I need to select a random number from the max number in the numeric range from a individual listing ID, then populate an additional column with “Won” where that number lies in the rows.

Can this be achieved in Bubble?

Your response will be much appreciated!

---

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [September 18, 2023, 12:56pm UTC](https://forum.bubble.io/t/adding-continuing-range-then-selecting-a-random-number/283701/2 "2023-09-18T12:56:49Z")

</div>

Which solution fits best depends on how many users and listings, see discussion of a similar but simpler problem:

> [@Get random value based on probabilities](http://forum.bubble.io/t/get-random-value-based-on-probabilities/278701):
>
> HI everyone, my problem is that User table has field points ( type : number ) Option table contain who take part in ( list of users ) Vote table list of options and date that make voting expired i want to choose a random user when vote expired ( consider that each user has a probability to be chosen equal to number of point / all users point sum ) Example to simplify it : let A , B, C are users A → point = 10 A → point = 20 A → point = 30 Sum = 10 + 20 + 30 = 60 now probability of A (…

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [November 26, 2023, 10:39am UTC](https://forum.bubble.io/t/adding-continuing-range-then-selecting-a-random-number/283701/3 "2023-11-26T10:39:36Z")

</div>

Closed on November 26, 2023, 10:39am UTC

This topic was automatically closed after 70 days. New replies are no longer allowed.
