Pricing Blog

Slicing a list

  • mbirkegaard-1181934867425017856

    mbirkegaard

    2 years ago

    I have a list of items and I'd like to pick out a sub-range like I'd normally do with .slice in javascript. Is there a formula for this?
  • erikbeus-1181940721750655016

    Erik Beuschau

    2 years ago

    Currently, we only have the formulas Take and Take Last (and Drop + Drop Last) which will either work with the beginning/end of your array/string. But it's a valid request 🙂 I'll see what I can do 👍
    In the meantime, you could build it as a custom formula if you want ⌨️
  • erikbeus-1181941337172480061

    Erik Beuschau

    2 years ago

    It's also possible to user Filter or Reduce to achieve the same although it's a bit more work 😅
  • mbirkegaard-1181942215770116116

    mbirkegaard

    2 years ago

    Ah! Take works perfectly for what I want, just couldn't find it in the formula editor 🙂
    🙌1