# charAt() in Jira Automation: syntax and examples

URL: https://goingstellar.ro/reference/smart-values/charat/

charAt() returns the single character at a position in a text value. Positions start at 0. It is useful for initials, prefixes and checks on the first letter of a summary.

## Syntax

```
{{issue.summary.charAt(index)}}
```

## Arguments

- `index` (required: yes): Position of the character, starting at 0.

## Works on

- Fields: any text value, such as issue.summary, issue.description or a label.
- Returns: a one-character text.

## Examples

```
{{issue.summary.charAt(1)}}
```

Read the second character, since counting starts at 0.

Result:

```
e
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.charAt(11)}}
```

Read the last character of a 12-character summary.

Result:

```
!
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.description.charAt(0)}}
```

Get the first letter of the description.

Result:

```
C
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.charAt(0)}}{{issue.summary.split(" ").last.charAt(0)}}
```

Build initials from the first letter of the first and the last word.

Result:

```
HW
```

Run on Jira Cloud on 29 Nov 2026.

```
{{issue.summary.charAt(0).toLowerCase()}}
```

Chain with toLowerCase() to normalise the first letter before comparing it.

Result:

```
h
```

Run on Jira Cloud on 29 Nov 2026.

## Where the documentation differs

- `{{issue.summary.charAt(12)}}`: run on Jira Cloud, 29 Nov 2026: the documentation says `Null`, the actual result is `Failed to get value for issue.summary.charAt(12)`.

## Pitfalls

- An index past the end of the text is a runtime error, not an empty value: `charAt(12)` on `Hello World!` fails with `Failed to get value for issue.summary.charAt(12)`. The Atlassian page says it returns Null (checked on Jira Cloud, November 2026).
- A negative index fails the same way (`Failed to get value for issue.summary.charAt(-1)`), so you cannot count from the end.
- The first character is index 0, so the last one is the length minus 1. Use `length` when the text size changes.

## Related

- [substring()](https://goingstellar.ro/reference/smart-values/substring/)
- [left() and right()](https://goingstellar.ro/reference/smart-values/left-right/)
- [length()](https://goingstellar.ro/reference/smart-values/length/)
- [indexOf() and lastIndexOf()](https://goingstellar.ro/reference/smart-values/indexof/)
- [split()](https://goingstellar.ro/reference/smart-values/split/)
- [toLowerCase() and toUpperCase()](https://goingstellar.ro/reference/smart-values/tolowercase-touppercase/)

## Sources

- [Jira smart values: text fields (Atlassian Support)](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-text-fields/)

