# Create array with numbers

**URL:** <https://forums.losant.com/t/create-array-with-numbers/3947>\
**Category:** Help\
**Tags:** workflow\
**Created:** [July 22, 2021, 4:36pm UTC](https://forums.losant.com/t/create-array-with-numbers/3947 "2021-07-22T16:36:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [July 22, 2021, 4:36pm UTC](https://forums.losant.com/t/create-array-with-numbers/3947/1 "2021-07-22T16:36:54Z")

</div>

Which workflow node would be easiest to use if I just wanted to create an array of incremental integer numbers and add to the payload? i.e number 100 to 150

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [July 22, 2021, 5:15pm UTC](https://forums.losant.com/t/create-array-with-numbers/3947/3 "2021-07-22T17:15:10Z")

</div>

Hey @Lars_Andersson,

There are a few ways to achieve this, but I’d love to get a sense of your use case so I can point you in the right direction. What are you looking to do with this array? Are you looking to do this on every workflow run? Will the beginning and ending numbers change?

Any additional information you can provide would be very beneficial!

Thank you,  
Heath

---

<div class="post-metadata">

**Author:** ![Lars\_Andersson](https://avatars.discourse-cdn.com/v4/letter/l/f05b48/32.png) [@Lars\_Andersson](https://forums.losant.com/u/Lars_Andersson)\
**Post date:** [July 22, 2021, 5:28pm UTC](https://forums.losant.com/t/create-array-with-numbers/3947/5 "2021-07-22T17:28:53Z")

</div>

Sorry, I often leave out some details…  
I have a device I’m reading some test record data from with an edge agent.  
But I only know the starting number and ending number of the test record.  
To loop over each record number I need an aray like [0]=100,[1]=101,[2]=102…[49]=150.  
Is a function node my only option?

---

<div class="post-metadata">

**Author:** ![Heath](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/heath/32/3036_2.png) [@Heath](https://forums.losant.com/u/Heath)\
**Post date:** [July 22, 2021, 5:42pm UTC](https://forums.losant.com/t/create-array-with-numbers/3947/7 "2021-07-22T17:42:35Z")

</div>

@Lars_Andersson,

The [Loop Node](https://docs.losant.com/workflows/logic/loop/) can take a number as the Loop Source. This would also give you the current index, so you could then use a [Math Node](https://docs.losant.com/workflows/logic/math/) to adjust a value to the value you need it to be.

Let me know if this works for this use case.

Heath
