Make 2 lists based on length of list from another list but one of the 2 lists can't be larger then 10indexes

Hi there.

I have 1 list containing 1-** values (lets call that List1). I never know how many values there are in list1.

I want to split List1 into 2 lists (List2 and List3), and that I know how to do. BUT List2 can’t be larger than 10indexes. Therefor since I add 1 value into List2 manually as (Show All) I can only get 9indexes from List1 into List2 and the rest from index10 in List1 can go into List3.

This I have managed, BUT the problem I get are when List1 contains less then 9 values. Then I get error saying it tries to get ex. index6 out of a list of 5. And that is correct since my blocks I’ve added tries to get all 9indexes from List1.

I can’t use length of list since then it would cause problems when the list is larger then 9.

I hope you understand, else I can try to elaborate again :slight_smile:

Any idea of how I can do this?

I’ve tried many ways, searched community and tried some blocks I found I thought could help, but it didn’t work as I want it to.

Here are my blocks I use to create List2 and List3:
image

Try this

procedure setList1 just creates items in list 1
setLists2And3 adds list1 items to lists2 and 3 as you have indicated

2 Likes

Yes, this is indeed true, I have tried this also, and this is kinda answer to my question as I see I didn’t include what I want to do with this lists in my topic. Sorry for that, I thought I did :crazy_face:

What I want to do is to add the values into extension FlipShare - But I don’t always know how many values there are in main list (List1).

I use 2x FlipShare, FlipShare1 can only contain 10 indexes, FlipShare2 can show the rest of indexes.
The thing is that when I try to add items I don’t figure out how to split it without 2 lists, nor the original list with all values.

With your example blocks I came up with a new idea, and tried that, but it seems the Global Length can’t be used :S Because the list I try with now only contains 8indexes. But in app it repeats itself somehow, it does not only show from 1 to 8 by 1.

Blocks I’m trying:

OMG, I don’t know why I made a Global var, when I could just do like this:

BUT it still repeats, I don’t know why :S

I made it work as I wanted :slight_smile:

Ty for the help @TimAi2 - Your blocks helped me figure this out by using those Math Blocks :wink:

Here’s my final blocks:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.