# Fields: Miscellaneous

> Part of the NocoDB documentation (Workflows > Scripts > Examples > Generic). Index of all pages: https://nocodb.com/llms.txt. Any docs page is available as Markdown by adding `.md` to its URL.

URL: https://nocodb.com/docs/workflows/scripts/examples/demo/field-miscellaneous
Last updated: 2026-08-17

Additional field types for attachments, checkboxes, ratings, and structured data.

This script demonstrates how to create & work with following fields in NocoDB
`Attachment` `Checkbox` `Rating` `JSON` `Geometry`

Detailed descriptions of each field type & associated configuration options are available in the [NocoDB meta API documentation](https://nocodb.com/apis/v3/meta#tag/Fields).

```javascript
// NocoDB Script: Create Miscellaneous Fields

const tableName = 'Misc Fields Demo';
let table = base.getTable(tableName);

if (!table) {
  table = await base.createTableAsync(tableName, []);
  output.text(`✅ Created table: "${tableName}"`);
}

async function createField(name, config) {
  if (!table.getField(name)) {
    await table.createFieldAsync({ name, ...config });
    output.text(`✅ Created: ${name}`);
  }
}

// Attachment Field
//
await createField('Attachment', { type: "Attachment" });

// Checkbox Field
//
await createField('Is Published', {
  type: "Checkbox",
  options: { icon: "square" }
});

// Rating Field
//
await createField('Priority', {
  type: "Rating",
  options: { icon: 'star', max_value: 5, color: '#F4B400' }
});

// JSON Field
//
await createField('Extra Info', { type: "JSON" });

// Geometry Field
//
await createField('Geometry Data', { type: "Geometry" });

output.table(table.fields.map(f => ({ 'Field Name': f.name, 'Type': f.type })));
output.text(`ℹ️ Total fields created: ${table.fields.length}`);
```

---

## Related pages

- [Table Operations](https://nocodb.com/docs/workflows/scripts/examples/demo/table-operations.md): Demonstrates how to check for table existence, create a table, and list all tables in the base.
- [Fields: Text-Based](https://nocodb.com/docs/workflows/scripts/examples/demo/field-text-based.md): Learn how to create and manage text-based fields in NocoDB.
- [Fields: Numerical](https://nocodb.com/docs/workflows/scripts/examples/demo/field-number-based.md): Learn how to create numerical fields for storing quantities, percentages, currency, and more.
- [Fields: Date & Time](https://nocodb.com/docs/workflows/scripts/examples/demo/field-date-time.md): Create fields to capture dates, times, and durations.
- [Fields: Select](https://nocodb.com/docs/workflows/scripts/examples/demo/field-select-based.md): Create single select and multi select fields for categorizing data.
- [Fields: System](https://nocodb.com/docs/workflows/scripts/examples/demo/field-system.md): Capture automatic audit information with system fields in NocoDB.
- [Fields: User & Collaborator](https://nocodb.com/docs/workflows/scripts/examples/demo/field-user.md): Assign or reference users directly within records.
- [Fields: Virtual & Formula](https://nocodb.com/docs/workflows/scripts/examples/demo/field-virtual.md): Add calculated or derivative data with virtual fields in NocoDB.
