Is the maximum value for `Sequence` fixed?

Recently I tried to use one select list to help selecting one specific element in one of my created big tables. Then I can show some info for that.

Then I found the maximum value for Sequence is 100001. Is that fixed so it will always work?

Hi Jack,

I’m not sure I understand what you mean or what you are trying to achieve.

To be honest, I have never had the need to use Sequence() with such high values, so I’m not sure if there’s a maximum. But probably there are better ways to iterate through a list of elements.

Tell us more about your use-case or share a dummy doc and I’m sure we can help you out.

1 Like

Ha, TIL there’s a limit on the number of items that a Sequence() can generate :sweat_smile:

Rather than the max value, the limit appears to be on the number of items. So technically you can slide your ‘window’ to e.g. start at 100 and include numbers up to 100101.

You can also generate a longer sequence using two Sequences, e.g. a ten times larger one (0–999,999) sequence like this:

Let(Sequence(0, 99999), SeqLarge,
Let(10, Multiplier,
Let(Sequence(0, Multiplier - 1), SeqSmall,
  SeqLarge.ForEach(CurrentValue.WithName(Outer,
    SeqSmall.ForEach(CurrentValue.WithName(Inner,
      Outer * Multiplier + Inner
    ))
  ))
))).ListCombine()

But it takes a while to calculate (and probably also takes up quite some RAM), so it’s not really a practical solution, and you should rather think of how to either:

  • limit the number of items you have to create in your lists (if many of those are redundant)
  • or implement ‘paginated’ viewing in subsets, e.g. 1–1000, 1001–2000 etc, or pre-filtered by some other criteria, if there’s really that many items to choose from.

P.S. Ah, you can just also do this:

ListCombine(
  Sequence(1, 100000),
  Sequence(100001, 200000)
)

i.e. combine as many sequences as you need manually in the formula, as long as each sequence individually is not over 100002 items long. This is faster than calculating, but it requires manually editing the formula.

2 Likes