# Multi Number Picker for Lotto App

**URL:** <https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588>\
**Category:** Need help\
**Created:** [February 19, 2022, 9:38pm UTC](https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588 "2022-02-19T21:38:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ianfosgate.23](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@ianfosgate.23](https://forum.bubble.io/u/ianfosgate.23)\
**Post date:** [February 19, 2022, 9:38pm UTC](https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588/1 "2022-02-19T21:38:26Z")

</div>

Hi there!

I’ve been stuck with this issue for quite a while. It might be that I used the wrong method or something since I am still very green to Bubble. I have below is a Lotto number picker:

 ![Screenshot](https://us1.discourse-cdn.com/bubble/original/3X/7/8/780be0d743a1c9d681aedafb7fb80010ce9a5355.png)

The main issue is that - I am not sure how to limit the entries to 6 entries based on the selection. This one I am stumped. Any other recommended methods is appreciated… in case this one is a dead end method.

Second issue would be kinda just for efficiency because I have a very very convoluted idea of making the numbers show up in the 6 boxes below (based on selection) but it’s a very long “Conditional” statement for each number 1-58. Any fresh ideas on tackling this differently would be greatly appreciated.

Thank you so much!

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [February 19, 2022, 9:45pm UTC](https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588/2 "2022-02-19T21:45:33Z")

</div>

Hi there, @ianfosgate.23… if I understand your post correctly, what you are describing should be easy to accomplish using a custom state or a list field on the `User` data type (I would likely go with the latter because I am assuming you don’t want a user to lose their selections if they refresh the page).

So, create a field called `picks` (or whatever you want to call it) on the `User` data type, and make that field a number field and also a list. Then, as a user selects numbers, add those numbers to the user’s `picks` field, and only allow the user to add more numbers when a count of the items in the list field is less than 6.

As far as displaying the selected numbers goes, a repeating group with a data source of `Current User's picks` should do the trick.

Hope this helps.

Best…  
Mike

Edit: one more thought… if users will be picking numbers, say, week after week, you can still go the route I suggested, but instead of putting the `picks` field on the `User` data type, put that field in a new data type and create a thing in that data type when a user picks their numbers for a given week.

---

<div class="post-metadata">

**Author:** ![ianfosgate.23](https://avatars.discourse-cdn.com/v4/letter/i/94ad74/32.png) [@ianfosgate.23](https://forum.bubble.io/u/ianfosgate.23)\
**Post date:** [February 19, 2022, 10:01pm UTC](https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588/3 "2022-02-19T22:01:07Z")

</div>

I see! Thank you so much for this insight! I never realized you can do the manipulation via DB. I’ll follow your instructions on how to make it work.

---

<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:** [April 30, 2022, 9:38pm UTC](https://forum.bubble.io/t/multi-number-picker-for-lotto-app/192588/4 "2022-04-30T21:38:45Z")

</div>

Closed on April 30, 2022, 9:38pm UTC

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