# Applab checkbox code

**URL:** <https://forum.code.org/t/applab-checkbox-code/34836>\
**Category:** Coding and Debugging Help\
**Tags:** applab\
**Created:** [June 21, 2021, 11:57am UTC](https://forum.code.org/t/applab-checkbox-code/34836 "2021-06-21T11:57:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![e.fat](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@e.fat](https://forum.code.org/u/e.fat)\
**Post date:** [June 21, 2021, 11:57am UTC](https://forum.code.org/t/applab-checkbox-code/34836/1 "2021-06-21T11:57:24Z")

</div>

Hi,  
In applab I want my students to use the checkbox option. When I did mine and checked the table I get results ‘True’ or ‘false’ whereas I want the name of the checkbox chosen. This is my example that I want to show my students: [Code.org - App Lab](https://studio.code.org/projects/applab/GGRMAllIaaROktEf44R8p8qc1SeMwIUzUIzWRZr3OrM)

[Posts in the debugging category need to have the following pieces of information included in order to help other teachers or our moderator team best help you. Feel free to delete everything in brackets before posting your request for debugging help.]

**Link to the project or level:** [replace with link to the curriculum or get the “Share” link to a project]  
**What I expect to happen:** [replace with a detailed description of the behavior you’re trying to create]  
**What actually happens:** [replace with a detailed description of what actually happens when the code runs including any errors or unexpected behavior]  
**What I’ve tried:** [replace with a detailed description of what you’ve already tried to do to solve the problem]

---

<div class="post-metadata">

**Author:** ![AndreaRobNott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/andrearobnott/32/4871_2.png) [@AndreaRobNott](https://forum.code.org/u/AndreaRobNott)\
**Post date:** [June 22, 2021, 2:52am UTC](https://forum.code.org/t/applab-checkbox-code/34836/2 "2021-06-22T02:52:05Z")

</div>

Hi @e.fat ,

When you create the record, you should use the associated text id instead of the checkbox value.  
Here is my quick change to your code for the first checkbox:

```auto
onEvent("button1", "click", function( ) {
  var response = getText("text_area1");
  if (getChecked("checkbox1")) {
    console.log("message");
    createRecord("Test", {Tech:response}, function() {
      console.log("received");
    });
  }
});

```

You would repeat for each checkbox. Hope this helps!

Happy computing!  
Andrea

---

<div class="post-metadata">

**Author:** ![e.fat](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@e.fat](https://forum.code.org/u/e.fat)\
**Post date:** [June 24, 2021, 4:40am UTC](https://forum.code.org/t/applab-checkbox-code/34836/3 "2021-06-24T04:40:30Z")

</div>

Thanks for that it worked. With this app also, I am trying to move to screen 2 when I press the button however it is changing.

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

---

<div class="post-metadata">

**Author:** ![e.fat](https://avatars.discourse-cdn.com/v4/letter/e/41988e/32.png) [@e.fat](https://forum.code.org/u/e.fat)\
**Post date:** [June 25, 2021, 5:06am UTC](https://forum.code.org/t/applab-checkbox-code/34836/4 "2021-06-25T05:06:44Z")

</div>

How would you fix this one? When I run I want the Home Screen visible and once the button is pressed, it will take them to the 2nd screen, however when I run it, it will automatically jump to screen2.

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

---

<div class="post-metadata">

**Author:** ![AndreaRobNott](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/andrearobnott/32/4871_2.png) [@AndreaRobNott](https://forum.code.org/u/AndreaRobNott)\
**Post date:** [June 29, 2021, 8:45pm UTC](https://forum.code.org/t/applab-checkbox-code/34836/5 "2021-06-29T20:45:18Z")

</div>

Hi, @e.fat ,

In design mode, you can assign a screen to be a start screen by clicking the ‘Make Default’ button.  
 ![image](https://us1.discourse-cdn.com/flex016/uploads/codeorgforum/original/2X/9/95429eef8e42e5068c3f9960c8a3c75c87dda6f0.png)

Happy computing,  
Andrea
