Select first Few Items from a list field

Hi Guys,

I have a list of things on a field (User selected through a RG). As a next step, I want to select (work flow) the first X# of items from that list. “X” is a value displayed on another field/element say “# of PLAYERS”.
Tried every possible combination of - :item from#, :item until# & :item# and the only thing that is working so far is - if I hard code :item# as some number, it selects that # from the list. But I need more than 1 items based on the variable in the other field “# OF PLAYERS”.

Is another hidden RG that display the first few items the only solution?

Hey @iwalkisee2017

You can just use a custom state (of type number) and set the value to the number of items you want to display. See here:

Demo: https://ambroisetestapps.bubbleapps.io/version-test/until-item
Editor: https://bubble.io/page?type=page&name=until-item&id=ambroisetestapps&tab=tabs-1

Hope that helps
Ambroise

Need extra help?

Book a free 15 minutes call - happy to help if I can

2 Likes

Thanks Ambroise. Your input is useful and I am thinking of rewiring my DBs and previous Workflow to match yours and see if that works for me.

Your DB: image

In my case all these values are in one cell. So 1st row of the column “Name”: will have values like: (“Test8”, “Test7”, “Test6”…) and I only want to select X #s from this cell. (this X is a value selected by user in another dropped down)

From other posts here, I think this is not possible in Bubble.

@iwalkisee2017 right I see, you might be able to use the same logic with states if your values in the field are a list of texts (“Test 1” + “Test2” + …)
If it’s just a basic text, I don’t think it would be possible

Hope that helps
Ambroise

Need extra help?

Book a free 15 minutes call - happy to help if I can

@ambroisedlg Its a list of Things (another table content grouped together in one cell from a UI - RG). I can make it like a “list of texts” if that is the only way to make this work

@iwalkisee2017 it’s fine then, check the editor again I’ve made a quick change

Ambroise

Need extra help?

Book a free 15 minutes call - happy to help if I can

1 Like

Looks good and in the right direction! So to resolve my original ask here; how to save this as a new thing (the entire result, as in your example:
image

I need to save only this result (Paris, Marseille, Bordeaux, Lille, Lyon) as a new thing in one row (in one cell in other table)

@iwalkisee2017 I’ve made a couple of examples on the editor, shouldn’t be more complex than that I think. Let me know if it solves your problem

Ambroise

Need extra help?

Book a free 15 minutes call - happy to help if I can

1 Like

Wow you are a master in this! That’s a big break through for me! Let me get this incorporated in mine and take it to the next steps!

Thanks a bunch brother! Its a fun project that I am working on and will let you now the final outcome :slight_smile:

1 Like

Glad it’s working for you! Feel free to let me know if you run into other issues and happy bubbling until then!

Ambroise

Need extra help?

Book a free 15 minutes call - happy to help if I can

Sure thing! :slight_smile: