---
name: "lbSortByValue"
type: command
status: ok
groups: ["GUI Control - ListBox"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/lbSortByValue
revid: 363604
updated: 2024-04-08T09:49:07Z
---

# lbSortByValue

*Command · GUI Control - ListBox · Arma 3 v0.50 · introduced in Armed Assault v1.08*

## Description

Sorts the ListBox entries by [lbValue](../commands/lbValue.md). The entries are sorted in ascending order. Also note that this command will mix up the entries randomly if multiple entries have the same value. In Arma 3 use [lbSortBy](../commands/lbSortBy.md) to avoid this problem.

## Syntax

### Syntax 1

```sqf
lbSortByValue control
```

**Parameters:**

- `control`: [Control](../topics/Control.md)

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

### Syntax 2

*since arma3 1.68*

```sqf
lbSortByValue idc
```

**Parameters:**

- `idc`: [Number](../topics/Number.md)

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

## Examples

### Example 1

```sqf
lbSortByValue _control;
```

### Example 2

```sqf
lbSortByValue 101;
```

## See also

[lbSortBy](../commands/lbSortBy.md) · [lbSort](../commands/lbSort.md)

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