> For the complete documentation index, see [llms.txt](https://docs.fieldmotion.com/fieldmotion-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fieldmotion.com/fieldmotion-api-docs/stock/_setname.md).

# \_setName

Set the name of a Stock item

### Parameters

#### id

Integer ID for the stock item.

#### val

String. The new name for the item

### Example

```
FM_api('Stock_setName',
	[
		'id'=>'7',
		'val'=>'2kg 1.75mm PLA Filament'
	]
);
```

### Result

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

If you try to update a Stock name to the name it already has, you will get a warning:

```
{"ok":1,"warning":"No change needed"}
```
