# Unit 4 set screen - decision making app help

**URL:** <https://forum.code.org/t/unit-4-set-screen-decision-making-app-help/39324>\
**Category:** Coding and Debugging Help\
**Tags:** csp-unit-4\
**Created:** [April 18, 2024, 5:37pm UTC](https://forum.code.org/t/unit-4-set-screen-decision-making-app-help/39324 "2024-04-18T17:37:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jedavis1](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jedavis1/32/8360_2.png) [@jedavis1](https://forum.code.org/u/jedavis1)\
**Post date:** [April 18, 2024, 5:37pm UTC](https://forum.code.org/t/unit-4-set-screen-decision-making-app-help/39324/1 "2024-04-18T17:37:32Z")

</div>

We’re expecting the screen to change based on drip and color. Is this a logic problem? Or is there something missing?

Sometimes the screen changes, but we can’t quite figure out the pattern or what might be conflicting.

> **[Check out what I made](https://studio.code.org/projects/applab/1QY_BfU2pSW30zgWx7LRDu9dii9gpYD8Y6eZ_LtUQSI)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![sgaraas](https://avatars.discourse-cdn.com/v4/letter/s/97f17d/32.png) [@sgaraas](https://forum.code.org/u/sgaraas)\
**Post date:** [April 18, 2024, 7:58pm UTC](https://forum.code.org/t/unit-4-set-screen-decision-making-app-help/39324/2 "2024-04-18T19:58:55Z")

</div>

You want to modify the variables prior to calling updateScreen() in each of the event handlers. This should fix the issue.

I will also add that for the drip, since it is a number, should be calling getNumber() and not getText(). It should also be initialized as a number instead of “”. This isn’t critical in App Lab, but if the student goes on to learn other programming languages, understanding the different data types is crucial and this would cause errors.

---

<div class="post-metadata">

**Author:** ![jedavis1](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/jedavis1/32/8360_2.png) [@jedavis1](https://forum.code.org/u/jedavis1)\
**Post date:** [April 18, 2024, 7:59pm UTC](https://forum.code.org/t/unit-4-set-screen-decision-making-app-help/39324/3 "2024-04-18T19:59:56Z")

</div>

Thank you! That did it!
