Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • CreatiCode
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

CreatiCode Scratch Forum

  1. CreatiCode Forum
  2. Knowledge Base
  3. 2D Blocks
  4. Introduction to Tables

Introduction to Tables

Scheduled Pinned Locked Moved 2D Blocks
1 Posts 1 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • CreatiCodeI Offline
    CreatiCodeI Offline
    CreatiCode
    wrote on last edited by admin
    #1

     

    Description

     
    You already know a list can store a sequence of numbers or text. Tables allow us to store multiple lists that are related. For example, suppose we need to store the IDs and names of 5 students. Instead of using 2 lists, it is better to use a table with 2 columns, so that it is clear which ID maps to which name.

    Each row in a table represents an object: for example, the first row says there is a student with the ID of 1 and a name of Adam.

    684c9fc9-3614-4f69-919e-411d31fe4877.png

     
     

    Adding a Table

     
    To add a table, go to the “Variables” category, and click “Make a table”. You need to give the table a unique name, and also specify whether it is shared by all the sprites or only belongs to the selected sprite.

    b2c2c5b8-c34e-4885-961e-c61368de3104.gif

       

    Renaming a Table

     
    If you want to change the settings of the table, you can right-click on its name, then select “Rename table”.

    5e10599c-e35a-44d4-85af-1edea5648993.gif

     
     

    Deleting a Table

     
    To delete a table, you can right-click on its name, then select “Delete the [censored] table”.

    6744afcd-878e-43a4-90fa-66207253de45.gif

     
     

    Adding Columns

     
    To add a new column to a table, click the grey “+” button. You can input a new column name, such as “Name” or “Age”, and then press the ENTER key to confirm.

    baba92d1-e5c4-4872-8400-9a11e34e8767.gif

     
     

    Renaming a Column

     
    When you click the dropdown button next to any column, there will be an option for you to rename that column.

    3ac52b79-7f2c-4cdf-b788-b6b2294bfce9.gif

     
     

    Deleting a Column

     
    Similarly, in the dropdown, there is an option for you to delete that column.

    3f8335f0-843e-4551-91e8-8037a45253ef.gif

     
     

    Adding and Removing Rows

     
    You can use the “+” button at the bottom left to add a new empty row. To remove a row, select that row first, then click the “x” button on the right.

    17e3ef3a-8c49-4f6e-8452-069d48c1839b.gif

     
     

    Adding Data

     
    You can select any cell to add data to it, just like with lists. Note that you can use the TAB key to jump to the following item.

    42409da4-561c-425e-ae1b-100b126e5e55.gif

     
     

    Changing Text Size

     
    You can use the + and - buttons next to the table name to change the size of the text.

    1765216e-6d34-41a5-93a3-8093abd32866.gif

     

    Learn More

     

    • Reading from a Table
    1 Reply Last reply
    0
    • CreatiCodeI CreatiCode pinned this topic on

    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

    With your input, this post could be even better 💗

    Register Login
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • CreatiCode