# Need help with coding on Decision Maker App

**URL:** <https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125>\
**Category:** Coding and Debugging Help\
**Created:** [March 7, 2024, 8:57pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125 "2024-03-07T20:57:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![christine.cox](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@christine.cox](https://forum.code.org/u/christine.cox)\
**Post date:** [March 7, 2024, 8:57pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/1 "2024-03-07T20:57:19Z")

</div>

Here is the link to the code a student is using:

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

We can’t get the function to run properly and update the response text area. I’m pretty new to this program as a teacher (my experience is in SQL and HTML). Can someone please help?

Thanks  
Christine

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [March 7, 2024, 9:12pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/2 "2024-03-07T21:12:55Z")

</div>

First of all, the project link is not working. Please share the correct link. Secondly, also please confirm that this is not a part of the Create PT. As per college board guidelines, teachers cannot help students on the Create PT.

---

<div class="post-metadata">

**Author:** ![christine.cox](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@christine.cox](https://forum.code.org/u/christine.cox)\
**Post date:** [March 7, 2024, 10:28pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/3 "2024-03-07T22:28:15Z")

</div>

This is not part of the create PT. I know I’m not allowed to hep with that. This is for the Decision Maker App in Unit 4.

---

<div class="post-metadata">

**Author:** ![christine.cox](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@christine.cox](https://forum.code.org/u/christine.cox)\
**Post date:** [March 7, 2024, 10:29pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/4 "2024-03-07T22:29:17Z")

</div>

Also, the link works when I use it, so I’m not sure how I’m entering it wrong. I’m just clicking the share button from the page and copying the link. This is the code:  
var dessert;  
var budget;

// where the person can eat based on budget  
onEvent(“budgetdropdown”, “click”, function( ) {  
budget = getText(“budgetdropdown”);  
checkCombos();  
});

//where the person can eat based on dessert chosen

//function  
function checkCombos() {  
if (budget \>= “8” && dessert == “Ice Cream”) {  
setText(“responsehtextarea”, “Leatherbys!”);  
} else if (budget \>= “8” && dessert == “Drinks”) {  
setText(“responsehtextarea”, “Sweet Tea Boba Shop!”);  
} else if (budget \>= “8” && dessert == “Pastries/Miscellaneous”) {  
setText(“responsehtextarea”, “Rick’s Dessert Diner!”);  
} else if (budget\<=“7” && dessert == “Ice Cream”) {  
setText(“responsehtextarea”, “Dairy Queen!”);  
} else if (budget\<=“7” && dessert == “Drinks”) {  
setText(“responsehtextarea”, “Dutch Bros!”);  
} else {  
setText(“responsehtextarea”, “Snooks Candies!”);  
}  
}

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [March 8, 2024, 12:24am UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/5 "2024-03-08T00:24:28Z")

</div>

This is the error I am getting when I click on the link. So I am not able to access your app.

![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/9/96c9df03e24eae45ae1251fb8249ca93975e6f66.png)

I recreated an app and used your code. I made a few changes to your code. Please check it out [here](https://studio.code.org/projects/applab/t1G5taC24iad7_k-9NPb9d62xB9sKcqyjrpyKYPPsrs).

---

<div class="post-metadata">

**Author:** ![christine.cox](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@christine.cox](https://forum.code.org/u/christine.cox)\
**Post date:** [March 8, 2024, 5:14pm UTC](https://forum.code.org/t/need-help-with-coding-on-decision-maker-app/39125/6 "2024-03-08T17:14:26Z")

</div>

Thank you so much! I appreciate your help 🙂
