# \[Solved\] How do I update text based on other buttons being clicked

**URL:** <https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194>\
**Category:** Questions about Thunkable X\
**Tags:** solved\
**Created:** [March 15, 2023, 7:01am UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194 "2023-03-15T07:01:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![eric7pcsbod](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eric7pcsbod/32/149698_2.png) [@eric7pcsbod](https://community.thunkable.com/u/eric7pcsbod)\
**Post date:** [March 15, 2023, 7:01am UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194/1 "2023-03-15T07:01:26Z")

</div>

Hi Kartik,  
Thank you for your detail reply, your method is ok, it can works ! 👍 🙏 😀

Anyway, I have another issue as photos below 😀

 ![PhotoOK](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/d/5/d501f63706065eb687d84c6362cdaeaeab49a833.png)

As my blocks setting, when Labels are green color, get a result to add the texts together,  
it’s ok as photo#1.

But when I want to set when all labels are white colors, get a result = 0,  
it fails, it gets a result still = 60, as photo#2.

I want to get a result = 0, as photo#3,  
what’s wrong with my blocks setting ?  
How can I correct them ?

Thanks for your helps and any suggestion!

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 15, 2023, 8:21am UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194/2 "2023-03-15T08:21:14Z")

</div>

is this the logic you’re trying to do?

before you enter the FOR EACH loop, set Number to 0  
inside your loop do this:  
IF color is not white  
add value to Number  
END\_IF

at END of FOR EACH LOOP  
check for NUmber  
if Number is zero, all cells are white  
if Number is not zero - its the sum of all that’s not white.

that’s what it seems like to me

---

<div class="post-metadata">

**Author:** ![eric7pcsbod](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eric7pcsbod/32/149698_2.png) [@eric7pcsbod](https://community.thunkable.com/u/eric7pcsbod)\
**Post date:** [March 15, 2023, 9:18am UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194/3 "2023-03-15T09:18:58Z")

</div>

Hi manyone,  
Your method works, it’s simple and perfect, this issue wasted me much time.  
I highly appreciate you and Thank You very much for your help!

---

<div class="post-metadata">

**Author:** ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)\
**Post date:** [March 15, 2023, 3:46pm UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194/4 "2023-03-15T15:46:43Z")

</div>

I’m glad to help

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [June 13, 2023, 3:47pm UTC](https://community.thunkable.com/t/solved-how-do-i-update-text-based-on-other-buttons-being-clicked/2325194/5 "2023-06-13T15:47:08Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
