When working with data in Ply, it’s important to understand the difference between items and tables.
An item is a single object, like a task.
A table is a collection of objects of the same kind, like a task list.
A contact is an item, and a contact list is a table. A row is an item, and a spreadsheet is a table. You get the picture.
An easy way to understand the difference is by looking at an actual table:
Task number | Task due date | Assignee | Instructions |
---|---|---|---|
1 | January 1st, 2022 | John Smith | Take out the trash! |
2 | December 15th, 2021 | Jane Doe | Buy milk! |
3 | May 22nd, 2018 | Mary Lamb | Mow the lawn! |
Each row in this table corresponds to an item because each row shows data on a single task.
The entire table ****is a table of tasks.
Let’s say we’re looking at one item from this table.
Task number: 1
Task due date: January 1st, 2022
Assignee: John Smith
Instructions: Take out the trash!
The labels “Task number”, “Task due date”, “Assignee”, and “Instructions” are properties, labelling the different pieces of item data.
When looking at items in a table, it makes sense to refer to properties as column headers because pieces of item data with the same property are in a column.