---
id: post/yzhums-com/70931
type: post
title: "Dynamics 365 Business Central: How to add a “TAB” character to a string via AL"
summary: The post explains how to add a TAB character to a string in AL code by using its ASCII character code (9) instead of trying to type it directly. This technique is useful for barcode generation and string formatting when TAB characters are needed as delimiters.
tier: community
language: en
tags:
  - al code
  - string handling
  - character manipulation
  - barcode generation
  - special characters
system: development
review:
  state: reviewed
  by: opus
  at: "2026-10-26T06:40:24.517Z"
  flags: []
generated:
  at: "2026-10-26T05:51:10.938Z"
  pipeline: 0.2.0
  prompts:
    extract-post: 1
  input_hash: 8837788c025e70cd1f0b45323bc878cf02971f78360e92118eaae8e58dd7d521
evidence:
  - kind: blog
    url: https://yzhums.com/70931/
    title: "Dynamics 365 Business Central: How to add a “TAB” character to a string via AL"
    date: "2026-04-20"
    commit: null
    t: null
    quote: null
  - kind: blog
    url: https://yzhums.com/70931/
    title: "Dynamics 365 Business Central: How to add a “TAB” character to a string via AL"
    date: "2026-04-20"
    commit: null
    t: null
    quote: The TAB key on the keyboard cannot actually be used to type TAB.
  - kind: blog
    url: https://yzhums.com/70931/
    title: "Dynamics 365 Business Central: How to add a “TAB” character to a string via AL"
    date: "2026-04-20"
    commit: null
    t: null
    quote: First, you need to find the number for the TAB character, 9.
links:
  learn: []
  objects:
    - object/codeunit/10
    - object/enum/9205
    - object/enum/9206
    - object/interface/barcode-font-provider-2d
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  related:
    - to: post/yzhums-com/74458
      title: "Dynamics 365 Business Central: How to add Filter by item attributes to the Item Ledger Entries page"
      label: possibly related
      why: both name Codeunit 10 "Type Helper"
      by: code
    - to: post/yzhums-com/69896
      title: "Dynamics 365 Business Central: How to add Notes (System Parts) from FactBox to a report"
      label: possibly related
      why: both name Codeunit 10 "Type Helper"
      by: code
    - to: post/yzhums-com/68755
      title: "Dynamics 365 Business Central: How to add or subtract hours from a DateTime field"
      label: possibly related
      why: both name Codeunit 10 "Type Helper"
      by: code
    - to: post/yzhums-com/70481
      title: "Dynamics 365 Business Central: How to convert Month Name (Text) to Month Number (Integer)"
      label: possibly related
      why: both name Codeunit 10 "Type Helper"
      by: code
    - to: post/aardvarklabs-blog/2678
      title: "Understanding AL Development: The Type Helper Code Unit"
      label: possibly related
      why: both name Codeunit 10 "Type Helper"
      by: code
post_id: "70931"
source_id: yzhums-com
source_name: Dynamics 365 Lab - Yun Zhu
url: https://yzhums.com/70931/
published_at: "2026-04-20T00:53:41.000Z"
author: Yun Zhu
full_text: false
words: 399
quotes:
  - text: The TAB key on the keyboard cannot actually be used to type TAB.
    why_it_matters: Explains why direct keyboard entry doesn't work and why an alternative approach is needed
  - text: First, you need to find the number for the TAB character, 9.
    why_it_matters: Provides the specific ASCII code needed to represent a TAB character in AL code
code_objects_mentioned:
  - codeunit Type Helper
  - report Item Info
  - enum Barcode Symbology 2D
  - enum Barcode Font Provider 2D
  - interface Barcode Font Provider 2D
systems:
  - development
versions_mentioned: []
preview:
  embeddable: true
  frame_url: null
  image: https://yzhums.com/wp-content/uploads/2026/04/Snipaste_2026-04-20_09-35-56.png
  image_alt: null
  image_w: null
  image_h: null
  site_name: Dynamics 365 Lab
  favicon: https://yzhums.com/wp-content/uploads/2020/08/cropped-logo-3-32x32.png
  probed_at: "2026-10-26T06:05:49.624Z"
---

# Dynamics 365 Business Central: How to add a “TAB” character to a string via AL

[Read the post](https://yzhums.com/70931/) · Dynamics 365 Lab - Yun Zhu (Yun Zhu, MVP) · 2026-04-20 · 399 words · tier community · reviewed (checked by Opus)

> The post explains how to add a TAB character to a string in AL code by using its ASCII character code (9) instead of trying to type it directly. This technique is useful for barcode generation and string formatting when TAB characters are needed as delimiters.

## Key points

- TAB character cannot be typed directly using the keyboard TAB key; use ASCII code 9 instead
- Create a Char variable and assign it the value 9 to represent the TAB character
- Concatenate the TAB character with other strings using the plus operator
- TAB-delimited strings can be split later using appropriate string manipulation methods

## Quotes

- "The TAB key on the keyboard cannot actually be used to type TAB." (Explains why direct keyboard entry doesn't work and why an alternative approach is needed)
- "First, you need to find the number for the TAB character, 9." (Provides the specific ASCII code needed to represent a TAB character in AL code)

## AL objects mentioned

As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.

- [codeunit 10 "Type Helper"](../../objects/codeunit/10.md)
- report "Item Info"
- [enum 9205 "Barcode Symbology 2D"](../../objects/enum/9205.md)
- [enum 9206 "Barcode Font Provider 2D"](../../objects/enum/9206.md)
- [interface "Barcode Font Provider 2D"](../../objects/interface/barcode-font-provider-2d.md)

Not found in BC28-30: report "Item Info".

## Possibly related

No source states these links: they share an object, a model read them, or a person found the same subject.

- [Dynamics 365 Business Central: How to add Filter by item attributes to the Item Ledger Entries page](../../posts/yzhums-com/74458.md) — possibly related: both name Codeunit 10 "Type Helper"
- [Dynamics 365 Business Central: How to add Notes (System Parts) from FactBox to a report](../../posts/yzhums-com/69896.md) — possibly related: both name Codeunit 10 "Type Helper"
- [Dynamics 365 Business Central: How to add or subtract hours from a DateTime field](../../posts/yzhums-com/68755.md) — possibly related: both name Codeunit 10 "Type Helper"
- [Dynamics 365 Business Central: How to convert Month Name (Text) to Month Number (Integer)](../../posts/yzhums-com/70481.md) — possibly related: both name Codeunit 10 "Type Helper"
- [Understanding AL Development: The Type Helper Code Unit](../../posts/aardvarklabs-blog/2678.md) — possibly related: both name Codeunit 10 "Type Helper"

## Context

- Features: barcode generation, QR code encoding, string concatenation, character encoding, TAB character handling

Source: Dynamics 365 Lab - Yun Zhu, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.
