# Link button to firebase

**URL:** https://community.thunkable.com/t/link-button-to-firebase/494879
**Category:** Questions about Thunkable X
**Created:** [March 3, 2020, 1:38am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879 "2020-03-03T01:38:57Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ariefakmal2605i4w](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ariefakmal2605i4w](https://community.thunkable.com/u/ariefakmal2605i4w)
#### Post date: [March 3, 2020, 1:38am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/1 "2020-03-03T01:38:57Z")

</div>

Can anybody help me…i want to link each icon button to firebase…this to help me do statistic how many person press a button

 ![Screenshot_2020-03-01-18-53-16-990_com.gmail.ariefakmal2605.appsunitfarmasihospitalalorgajah](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/a/7add3a14e84991c252d4cb798081a7e326672eed.jpeg)

---

<div class="post-metadata">

### Author: ![farhanlatif027i3df](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/farhanlatif027i3df/32/65615_2.png) [@farhanlatif027i3df](https://community.thunkable.com/u/farhanlatif027i3df)
#### Post date: [March 3, 2020, 1:05pm UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/2 "2020-03-03T13:05:16Z")

</div>

What I would do is set up 6 labels to represent 6 options. And recall previous firebase values to these labels (last step)

Then use firebase tag such as app user id / work schedule or if you don’t have firebase auth then just use tag “work schedule clicks” or something and same goes for other options. Then ever time a button is clicked you use addition math block  
Which is “1+1” but you replace 1 with get label text “work schedule click” (this will be your firebase value) and then I would add an if statement which says if label 1 is undefined set it to 0 because when there is no value and you recall database values to the labels it will say undefined

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [March 3, 2020, 1:32pm UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/3 "2020-03-03T13:32:44Z")

</div>

Hey @ariefakmal2605i4w is there any reason in particular why you have to use Firebase for this task?

---

<div class="post-metadata">

### Author: ![farhanlatif027i3df](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/farhanlatif027i3df/32/65615_2.png) [@farhanlatif027i3df](https://community.thunkable.com/u/farhanlatif027i3df)
#### Post date: [March 3, 2020, 2:27pm UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/4 "2020-03-03T14:27:21Z")

</div>

I agree with @domhnallohanlon airtable would be much more suitable you can just use “ update row number”

---

<div class="post-metadata">

### Author: ![ariefakmal2605i4w](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ariefakmal2605i4w](https://community.thunkable.com/u/ariefakmal2605i4w)
#### Post date: [March 4, 2020, 7:45am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/5 "2020-03-04T07:45:53Z")

</div>

@domhnallohanlon i use firebase for statistic,when user click a button, it count as one…so end of the month i know how many user are click the button…this for my pilot study…

---

<div class="post-metadata">

### Author: ![ariefakmal2605i4w](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ariefakmal2605i4w](https://community.thunkable.com/u/ariefakmal2605i4w)
#### Post date: [March 4, 2020, 7:48am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/6 "2020-03-04T07:48:59Z")

</div>

Owhh… I am confuse to use airtable or firebase to count usage daily… i am new on using block…

---

<div class="post-metadata">

### Author: ![ariefakmal2605i4w](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ariefakmal2605i4w](https://community.thunkable.com/u/ariefakmal2605i4w)
#### Post date: [March 4, 2020, 7:51am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/7 "2020-03-04T07:51:11Z")

</div>

![Screenshot_2020-03-04-15-36-47-277_com.thunkable.live](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/8/48853f267b7ec15b265f3d06fbab749578063c6c.jpeg)

For the moment i just found this way

---

<div class="post-metadata">

### Author: ![farhanlatif027i3df](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/farhanlatif027i3df/32/65615_2.png) [@farhanlatif027i3df](https://community.thunkable.com/u/farhanlatif027i3df)
#### Post date: [March 4, 2020, 9:01am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/8 "2020-03-04T09:01:49Z")

</div>

That’s good but you need data not just functionality using variables will only increase the amount in app you won’t be able to see it personally unless labels are visible then anyone whose using your app can use it

I’ll tell you very easy step and don’t worry you don’t have to remove anything.

Go to airtable. Make 6 rows  
For example product 1 row 1  
Then update this row number when product 1 is clicked. You will find the update row number block in airtable blocks.

---

<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, 11:40am UTC](https://community.thunkable.com/t/link-button-to-firebase/494879/9 "2024-11-08T11:40:36Z")

</div>


