Collect answers from students (or anyone)

A teacher wants each student to submit answers, see only their own, and never see each other's. OpenThink does this with **row-level permissions** on a data table.

1. Create a submissions table

In your class space, create a table named **Submissions** with columns such as:

| Column | Type |

|---|---|

| Name | Name (title) — e.g. the question |

| Answer | Text |

| Score | Number |

2. Give students the "Own" rule

On the table, choose one of:

- **Invite students by email** with the **Own** rule, or

- **Open the table's link** with the **Own** rule, so any signed-in person with the link can submit.

With **Own**, a student can add rows and only see, edit and delete the rows they created. Use **Append** if students should submit without seeing even their own answers afterwards, or **Read all, edit own** for a shared board where everyone sees every post.

Tables with row-level permissions are sealed automatically: embedding the table elsewhere doesn't let anyone read more than their rule allows.

3. Share the lesson

Invite students to **View** the space or folder with the lesson.

- If you **invited students to the table by email** with a rule, that rule decides for them on that table — a student who can view the whole space still sees only their own submissions.

- If you used the **table's link** instead, link rules only add to what people already have. A student who can view the space containing the table would see every row, so keep the table outside what you share with View, or invite students to the table directly.

4. (Optional) Build a submission form

Make an [HTML page](https://openthink.app/n/4727d3d3ab91) with a form that adds a row:

```js

async function submit(question, answer) {

if (!think.signedIn) return think.signIn();

await think.executeSql(

'INSERT INTO "Submissions" ("Name", "Answer") VALUES (?, ?)',

[question, answer]

);

}

// With the Own rule, this returns only the viewer's own rows:

const { rows } = await think.executeSql('SELECT "Name", "Answer", "Score" FROM "Submissions"');

```

Students must be signed in to submit. Each person can add up to 60 rows a minute. Select values must be options the table already has.

5. Mark the work

As the owner you see every row, with a **Created by** field showing which student wrote it. Fill in the Score column — each student sees their own score.

Note: with **Own**, students can also edit their own rows, including Score. If they mustn't change scores, keep scores in a separate sealed table that only you can edit.

Related

- [Sharing & permissions](https://openthink.app/n/26c72c31ab9c) — all roles and rules

- [HTML page API](https://openthink.app/n/880ac6e69d53) — `think.executeSql`, `think.viewer`, `think.signIn()`