# \_edit

Edit or Create a table and its columns

### Parameters

#### id

ID of the table. If the ID does not exist, then it will be created.

#### name

Name of the table. Will be shown in tab in CRM.

#### fields

JSON array describing the columns.

### Example

```
FM_api('CustomerTable_edit',['id'=>'1580830943940','name'=>'aef','fields'=>'[{"id":"1","name":"b","type":"text"},{"id":"31","name":"f","type":"text"},{"id":"3","name":"d","type":"text"},{"id":"2","name":"c","type":"textarea"},{"id":"32","name":"g","type":"text"}]']);
```

Note that the column IDs do not need to be sequential. Current `type` options are : text/textarea

#### On Success

```
{"ok":"1"}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fieldmotion.com/fieldmotion-api-docs/customertable/_edit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
