---
name: "tvSetValue"
type: command
status: ok
groups: ["GUI Control - Tree View"]
arma3_since: "0.74"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/tvSetValue
revid: 321508
updated: 2022-05-17T11:23:14Z
---

# tvSetValue

*Command · GUI Control - Tree View · Arma 3 v0.74*

Locality: arguments **local** · effect **local**

## Description

Sets scalar data to item on given path. IDC means id of parent Tree View. If the given value is not integer, it will be converted to integer

## Syntax

### Syntax 1

```sqf
tvSetValue [idc, path, val]
```

**Parameters:**

- `idc`: [Number](../topics/Number.md)
- `path`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s
- `val`: [Number](../topics/Number.md)

**Returns:** [Nothing](../topics/Nothing.md)

### Syntax 2

```sqf
ctrl tvSetValue [path, val]
```

**Parameters:**

- `ctrl`: [Control](../topics/Control.md)
- `path`: [Array](../topics/Array.md) of [Number](../topics/Number.md)s
- `val`: [Number](../topics/Number.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
tvSetValue [101, [0], 555];
```

### Example 2

```sqf
_ctrl tvSetValue [[0,0,0], 14];
```

## See also

[tvAdd](../commands/tvAdd.md) · [tvClear](../commands/tvClear.md) · [tvCollapse](../commands/tvCollapse.md) · [tvCount](../commands/tvCount.md) · [tvCurSel](../commands/tvCurSel.md) · [tvData](../commands/tvData.md) · [tvDelete](../commands/tvDelete.md) · [tvExpand](../commands/tvExpand.md) · [tvPicture](../commands/tvPicture.md) · [tvSetCurSel](../commands/tvSetCurSel.md) · [tvSetData](../commands/tvSetData.md) · [tvSetPicture](../commands/tvSetPicture.md) · [tvSort](../commands/tvSort.md) · [tvSortByValue](../commands/tvSortByValue.md) · [tvText](../commands/tvText.md) · [tvValue](../commands/tvValue.md)

<sub>Source: [BI Community Wiki — tvSetValue](https://community.bistudio.com/wiki/tvSetValue) (revision 321508).</sub>
