# Sequential Integer (Feature Requested on GitHub)

**URL:** <https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232>\
**Category:** Questions about Thunkable X\
**Created:** [February 20, 2021, 5:24pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232 "2021-02-20T17:24:00Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![huntermclarkn](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/huntermclarkn/32/66310_2.png) [@huntermclarkn](https://community.thunkable.com/u/huntermclarkn)\
**Post date:** [February 20, 2021, 5:24pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/1 "2021-02-20T17:24:00Z")

</div>

I have posted this as a Feature Request on GitHub, but would be interested in hearing other feedback or workarounds here

I would like a Sequential Integer block like the Random Integer Block in Math  
[![Screenshot 2021-02-20 165530](https://user-images.githubusercontent.com/63498579/108602893-995c7d80-739c-11eb-956a-663663708589.png)](https://user-images.githubusercontent.com/63498579/108602893-995c7d80-739c-11eb-956a-663663708589.png)

The reason is to assist the use of Buckets in Firebase. When Creating Buckets on firebase, I need a way to access sequential buckets. If I create a Bucket with text I can have individualized buckets, but cannot access those buckets on another screen as the key is linked to specific text on the other page. (See 2 Below)  
[![Screenshot 2021-02-20 170006](https://user-images.githubusercontent.com/63498579/108603024-5a7af780-739d-11eb-93f3-41d3f5f9c00b.png)](https://user-images.githubusercontent.com/63498579/108603024-5a7af780-739d-11eb-93f3-41d3f5f9c00b.png)  
[![Screenshot 2021-02-20 170117](https://user-images.githubusercontent.com/63498579/108603025-5b138e00-739d-11eb-8e1d-ed315cb6afb3.png)](https://user-images.githubusercontent.com/63498579/108603025-5b138e00-739d-11eb-8e1d-ed315cb6afb3.png)

As I cannot access unique text from one page on another (saving as a Stored or App Var would have the information not accessible on multiple devices) I tried to use the Random Integer from x-x Block. This gets part way there it saves as a bucket within a bucket AND allows me to access the information on a different screen. The issue is the number selection is random. As such I can only access the data by knowing the random value selected. (See 4 Below)  
[![Screenshot 2021-02-20 170803](https://user-images.githubusercontent.com/63498579/108603246-d9246480-739e-11eb-8227-fad252f79a20.png)](https://user-images.githubusercontent.com/63498579/108603246-d9246480-739e-11eb-8227-fad252f79a20.png)  
[![Screenshot 2021-02-20 170834](https://user-images.githubusercontent.com/63498579/108603247-d9bcfb00-739e-11eb-9855-3c826be46cbd.png)](https://user-images.githubusercontent.com/63498579/108603247-d9bcfb00-739e-11eb-9855-3c826be46cbd.png)  
[![Screenshot 2021-02-20 170947](https://user-images.githubusercontent.com/63498579/108603248-d9bcfb00-739e-11eb-9917-0327dbccdeb0.png)](https://user-images.githubusercontent.com/63498579/108603248-d9bcfb00-739e-11eb-9917-0327dbccdeb0.png)  
[![Screenshot 2021-02-20 171205](https://user-images.githubusercontent.com/63498579/108603249-da559180-739e-11eb-9da0-fe72d5f68aa4.png)](https://user-images.githubusercontent.com/63498579/108603249-da559180-739e-11eb-9da0-fe72d5f68aa4.png)

Firebase does not like the Seconds Since 1970 block so I cannot attempt that. I think that if I could set a Sequential Integer from x-x block, I could set the key on the other page to expect a sequential set of values and access buckets within buckets. The randomness of the Random Integer Block makes that difficult unless I know the random number chosen.

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 20, 2021, 5:41pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/2 "2021-02-20T17:41:06Z")

</div>

If you use the cloud variable blocks with the list blocks, you’ll achieve what you’re going for. Thunkable handles the incremental numbering of the collection name (field names).

@drted has posted on this in the past. Do some searching and you’ll surely find the threads.

---

<div class="post-metadata">

**Author:** ![huntermclarkn](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/huntermclarkn/32/66310_2.png) [@huntermclarkn](https://community.thunkable.com/u/huntermclarkn)\
**Post date:** [February 20, 2021, 5:42pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/3 "2021-02-20T17:42:34Z")

</div>

If I use the Cloud Var I can’t set the Key how I want. I use the RTDB Block so I can set buckets within buckets

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 20, 2021, 5:44pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/4 "2021-02-20T17:44:32Z")

</div>

You can tho!

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/6/7634f98274b754731ca16acaf63990b267460ef7.jpeg)

Here using 1 cloud variable I have many different buckets.

Forget - main bucket

UserID - sub bucket of forget

Crossoff, date, note - all subbuckets found in each userID sub bucket and each is a list of objects.

An example of what this could look like on FB using only a single cloud variable follong the idea above

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/d/bddd6c85a42b68b8d903d59f8c5219a3a2e231fe.jpeg) ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/4/0409e271f751ca48aff9408e28082a2fdf4dd148.jpeg) ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/8/d8a027f7c49f4406500c1420b171c6bf4fadf859.jpeg)

The numbering is maintained by thunkable. Big IF here tho. iF you delete a numbered node, your list won’t work anymore. Instead, add a property to each terminal node called deleted:no

When you delete a value, you’ll actually only switch deleted to :yes and filter any result whose property of deleted = true

---

<div class="post-metadata">

**Author:** ![huntermclarkn](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/huntermclarkn/32/66310_2.png) [@huntermclarkn](https://community.thunkable.com/u/huntermclarkn)\
**Post date:** [February 21, 2021, 11:29am UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/6 "2021-02-21T11:29:37Z")

</div>

I will give it a shot. For some reason i can never get the Cloud Var to work, but I will try it out

Okay, I am having a hard time getting thunkable to set numbering. I have it set up as

 ![Screenshot 2021-02-21 112836](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/e/de700c11298ce7c19403e58fd5c963994366695c.png)

But on Firebase it just replaces the Note bucket each time instead numbering…

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 21, 2021, 12:07pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/7 "2021-02-21T12:07:10Z")

</div>

Use list blocks. Check this thread for an idea

> [@Jared's Cloud to-do app](https://community.thunkable.com/t/jareds-cloud-to-do-app/502646):
>
> Components: Cloud Variable / DIY Extended Listviewer / Recursive Functions / Dynamic Labels / RealtimeDB Authentication Hey Thunkers!I have wanting to use firebase for a while to store and retrieve lists of variables. quickly. but parsing all the text is resource consuming, takes a bunch of blocks, and is tricky. I considered the cloud vairables for some time now but couldn’t wrap my head around how to use private user keys. I have figured it out and want to share with everyone here. In my exa…

In list =\> yourCloudVariable =\> insert last as =\> your object

Here’s a project link  
[https://x.thunkable.com/projectPage/5e5c91ca5d0aa012e56848bd](https://x.thunkable.com/projectPage/5e5c91ca5d0aa012e56848bd)

---

<div class="post-metadata">

**Author:** ![huntermclarkn](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/huntermclarkn/32/66310_2.png) [@huntermclarkn](https://community.thunkable.com/u/huntermclarkn)\
**Post date:** [February 21, 2021, 2:19pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/8 "2021-02-21T14:19:24Z")

</div>

I had tried that but once I add a cloud Var to list it stops saving if I set this up

 ![Screenshot 2021-02-21 141457](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/314e14a0763445549b29bc3831ca19f2b8abc97d.png)  
Then it won’t save to RTDB and nothing happens.

When I do like this, is does save to RTDB but not sequentially

 ![Screenshot 2021-02-21 141806](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/e/3ee4df167bba7190701fcbecb93fc90b05bd72c5.png)

Even if using the list method, I just try to save anything it doesn’t upload to RTDB

---

<div class="post-metadata">

**Author:** ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)\
**Post date:** [February 21, 2021, 4:25pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/9 "2021-02-21T16:25:44Z")

</div>

Do you initialize the /Note bucket as an empty list.

Check if that bucket is null. If null, set it as an empty list

I do this when the user signs in

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/7/972f0a990947bb415dfc14d2cc8bd0f9aa29815f.jpeg)

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:29pm UTC](https://community.thunkable.com/t/sequential-integer-feature-requested-on-github/1112232/10 "2024-11-08T13:29:15Z")

</div>


