---
name: "createDiaryRecord"
type: command
status: ok
groups: ["Briefing"]
arma3_since: "0.50"
locality: {"argument": "local", "effect": "local", "server_exec": false}
source: https://community.bistudio.com/wiki/createDiaryRecord
revid: 370359
updated: 2024-12-02T16:08:54Z
---

# createDiaryRecord

*Command · Briefing · Arma 3 v0.50 · introduced in Arma 2 v1.00*

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

## Description

Creates a Diary entry. Supported tags and their parameters:

| Tag | Options | Example |
|---|---|---|
| img | - *image*: [String](../topics/String.md) - path to image. When present, any element with it will be displayed as image.<br>- *width*: [Number](../topics/Number.md) - image width in pixels.<br>- *height*: [Number](../topics/Number.md) - image height in pixels.<br>- Arma 3 v2.10 *title*: [String](../topics/String.md) - tooltip to show on mouse over image<br>- Arma 3 v2.10 *src*: [String](../topics/String.md) - alternative to 'image'<br>> [!NOTE]<br>> **Arma 3:** Maximum width supported seems to be **370** pixels as a wider image will be cut off. Height should be calculated with the aspect ratio of the image. `height = 370; ratio = 16/9; height = width / ratio;` | ```html<br><img image="picture.paa" width="128" height="64" /><br>```<br>Since Arma 3 v2.10:<br>```html<br><img src="picture.paa" width="128" height="64" title="this is an image" /><br>``` |
| font | - *color*: [String](../topics/String.md) - [HTML color](https://en.wikipedia.org/wiki/HTML_color) in format #aarrggbb or #rrggbb<br>- *size*: [Number](../topics/Number.md) - font height in pixels (default: 14)<br>- *face*: [String](../topics/String.md) - font type (see Fonts) | ```html<br><font color="#FF00FF" size="16" face="LucidaConsoleB">Hello there</font><br>``` |
| br | N/A | ```html<br>Line 1<br />Line 2<br>``` |
| marker | - *name*: [String](../topics/String.md) - marker name | ```html<br><marker name="respawn_west">Respawn point</marker><br>``` |
| execute | - *expression*: [String](../topics/String.md) - executed code | ```html<br><execute expression="player setDamage 1">Die!</execute><br>``` |
| executeClose | - *expression*: [String](../topics/String.md) - executed code, diary is closed afterwards | ```html<br><executeClose expression="player setDamage 1">Die and close</executeClose><br>``` |
| [log](../commands/createDiaryLink.md) | - *subject*: [String](../topics/String.md) - [subject](../commands/createDiarySubject.md) name.<br>- *record*: [String](../topics/String.md) - record ID (e.g. "Record6" or "Unit1059524") | ```html<br><log subject="Hello">Get to the "Hello" subject</log><br>```<br>```html<br><log subject="Hello" record="Record0">Go to the first record added to "Hello"</log><br>``` |
| gear | - *unit*: [Number](../topics/Number.md) - unit ID | ```html<br><gear unit="123456">Open unit 123456's gear</gear><br>``` |
| teamSwitch | - *unit*: [Number](../topics/Number.md) - unit ID | ```html<br><teamSwitch unit="123456">Switch to unit 123456</teamSwitch><br>``` |
| kick | - *id*: [Number](../topics/Number.md) - unit ID | ```html<br><kick unit="123456">Kick player unit 123456</kick><br>``` |
| ban | - *id*: [Number](../topics/Number.md) - unit ID | ```html<br><ban unit="123456">ban player unit 123456</ban><br>``` |
| mute | - *id*: [Number](../topics/Number.md) - unit ID | ```html<br><mute unit="123456">mute player unit 123456</mute><br>``` |
| voteadmin | - *id*: [Number](../topics/Number.md) - unit ID | ```html<br><voteadmin unit="123456">vote admin unit 123456</voteadmin><br>``` |
| votekick | - *id*: [Number](../topics/Number.md) - unit ID | ```html<br><votekick unit="123456">vote kick player unit 123456</votekick><br>``` |
| currentTask | - *id*: [Number](../topics/Number.md) - task ID<br>- *action*: [String](../topics/String.md) - 'n' or 's' (select) | ```html<br><currentTask id="my_task">get to my_task task</currentTask><br>``` |

> [!NOTE]
> If the [createDiaryRecord](../commands/createDiaryRecord.md) command fails, it returns a null record.
> Before Arma 3 v2.00, [isNull](../commands/isNull.md) did not work with the diary record type and [diaryRecordNull](../commands/diaryRecordNull.md) did not exist.
> In order to verify a null record, it is possible to create a variable and compare against it:
>
> ```sqf
> private _recordNull = objNull createDiaryRecord [];
> private _createdRecord = player createDiaryRecord ["Diary", ["Title", "Description"]];
> if (_createdRecord isEqualTo _recordNull) then { hint "Failed"; };
> ```

## Syntax

```sqf
player createDiaryRecord [subject, textInfo, task, taskState, showTitle]
```

**Parameters:**

- `player`: [Object](../topics/Object.md)
- `subject`: [String](../topics/String.md)
- `textInfo`: [String](../topics/String.md) or [Array](../topics/Array.md) of [String](../topics/String.md)s - can be:
  - [String](../topics/String.md) - the record's content - its title will be empty
  - [Array](../topics/Array.md) of [String](../topics/String.md)s - format [title, text, icon]:
    - title: [String](../topics/String.md)
    - text: [String](../topics/String.md)
    - Arma 3 v2.10 icon: [String](../topics/String.md) - (Optional) icon to show next to the title
- `task`: [Task](../topics/Task.md) - (Optional, default [taskNull](../commands/taskNull.md))
- `taskState`: [String](../topics/String.md) - (Optional, default `"NONE"`) changes the state of the given task. Can be one of:
  - `"NONE"`
  - `"CREATED"`
  - `"ASSIGNED"`
  - `"SUCCEEDED"`
  - `"FAILED"`
  - `"CANCELED"`
- `showTitle`: [Boolean](../topics/Boolean.md) - (Optional, default [true](../commands/true.md)) whether or not to show title in the description section as well *(since arma3 1.96)*

**Returns:** [Diary Record](../topics/Diary_Record.md)

## Examples

### Example 1

```sqf
player createDiaryRecord ["Diary", ["Intel", "Enemy base is on grid <marker name='enemyBase'>161170</marker>"]];
```

### Example 2

```sqf
player createDiaryRecord ["Diary", "Information gathered.<br /><img image='wellDone_ca.paa' />"];
```

### Example 3

```sqf
player createDiaryRecord ["Diary", ["Title", "Description"], taskNull, "", false];
```

### Example 4

```sqf
player createDiaryRecord [
    "Diary",
    ["Font tag", "<font color='#7FFF00' size='30' face='TahomaB'>This will changed text size, colour and font</font>"],
    taskNull,
    "",
    false
];
```

### Example 5

```sqf
player createDiaryRecord [
    "Diary",
    ["Image", "<img image='\A3\Ui_F_Curator\Data\Logos\arma3_curator_artwork.jpg' width='500' height='800' />"],
    taskNull,
    "",
    false
];
```

### Example 6

```sqf
player createDiaryRecord ["Diary", ["Linebreak", "Line1<br />Line2<br /><br />Line4"], taskNull, "", false];
```

### Example 7

```sqf
player createDiaryRecord ["Diary", ["Execute","<execute expression='hint ""Some code"";'>Some text</execute>"], taskNull, "", false];
```

### Example 8

```sqf
player createDiaryRecord ["Diary", ["ExecuteClose", "<executeClose expression=""hint 'Diary closed';"">Close Diary</executeClose>"], taskNull, "", false];
```

## See also

[allDiaryRecords](../commands/allDiaryRecords.md) · [processDiaryLink](../commands/processDiaryLink.md) · [createDiaryLink](../commands/createDiaryLink.md) · [createDiarySubject](../commands/createDiarySubject.md) · [diarySubjectExists](../commands/diarySubjectExists.md) · [setDiaryRecordText](../commands/setDiaryRecordText.md) · [removeDiaryRecord](../commands/removeDiaryRecord.md)

## Community notes

**Tankbuster** — 2017-03-24

When adding multiple diary records, be aware that they appear in reverse order. ie the first one you add will appear last and the last one you add will be first.

---

**R3vo** — 2019-06-22

It seems that the **task** parameter has no effect in Arma 3 because the task entry in the briefing menu is created when the task itself was created.

---

**Honger** — 2022-10-18

<log>, as `createDiaryLink`, requires declaring **both** subject and ID of the record belonging to said subject. Otherwise generated text will not be clickable or might open a non-existing record (behaviour similar to clicking on map when viewing Diary).

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