---
id: object/table/1237
type: object
title: Table 1237 "Transformation Rule"
summary: Table 1237 "Transformation Rule" in Base Application (System.IO). 22 fields, 24 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.
tier: official
language: en
tags:
  - table
  - base application
versions:
  introduced: null
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: acec63162693c9667d1cbde7e78ba8d899e754f72be851a8543d84b35f19d2a9
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataExchange/TransformationRule.Table.al
    title: src/Layers/W1/BaseApp/System/DataExchange/TransformationRule.Table.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
object_type: table
object_id: 1237
name: Transformation Rule
namespace: System.IO
app: Base Application
extends: null
first_version: "23"
last_version: "30"
present_in:
  - "23"
  - "24"
  - "25"
  - "26"
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "24"
  - "25"
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 22
  procedures: 30
  events: 5
  subscribers: 0
relations:
  out: 2
  referenced_by: 6
  pages: 2
  extended_by: 0
  event_subscribers: 1
  calls: 1
  called_by: 0
  implements: 0
---

# Table 1237 "Transformation Rule"

> Table 1237 "Transformation Rule" in Base Application (System.IO). 22 fields, 24 public procedures, 5 events. Present since at least BC23, still in BC30, changed in BC24-25, BC28-29.

Base Application · System.IO · BC23-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/Layers/W1/BaseApp/System/DataExchange/TransformationRule.Table.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Caption | Transformation Rule |
| DataClassification | CustomerContent |

## Fields

Explanation: the field's ToolTip in the code; without one, the ToolTip of a page control bound to the field (marked via the page); without that, its Caption (marked caption) when that differs from the name.

| No. | Name | Type | Explanation | Notes |
|---|---|---|---|---|
| 1 | Code | Code[20] | Specifies rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Business Central. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | NotBlank |
| 2 | Description | Text[100] | Specifies rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Business Central. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 3 | Transformation Type | Enum "Transformation Rule Type" | Specifies rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Business Central. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | enum [Enum 1237 "Transformation Rule Type"](../enum/1237.md) |
| 10 | Find Value | Text[250] | Specifies in the Transformation Rule table the rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Microsoft Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 11 | Replace Value | Text[250] | Specifies rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 12 | Starting Text | Text[250] | Specifies the first part of text that was imported from an external file to be transformed to a supported value by mapping to the specified field in Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 13 | Ending Text | Text[250] | Specifies the last part of text that was imported from an external file to be transformed to a supported value by mapping to the specified field in Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 15 | Start Position | Integer | Specifies rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 16 | Length | Integer | Specifies the length of one item unit when measured in the specified unit of measure. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 18 | Data Format | Text[100] | Specifies in the Transformation Rule table the rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Microsoft Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 20 | Data Formatting Culture | Text[10] | Specifies in the Transformation Rule table the rules for how text that was imported from an external file is transformed to a supported value that can be mapped to the specified field in Microsoft Dynamics 365. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 30 | Next Transformation Rule | Code[20] | Specifies the transformation rule that takes the result of this rule and transforms the value. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | TableRelation [Table 1237 "Transformation Rule"](../table/1237.md) ("Transformation Rule".Code) |
| 50 | Table ID | Integer | Specifies the ID of the table to get the record for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 51 | Table Caption | Text[250] | Specifies the caption of the table to get the record for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | FlowField: lookup(AllObjWithCaption."Object Caption" where("Object Type" = const(Table), "Object ID" = field("Table ID"))); not editable |
| 52 | Source Field ID | Integer | Specifies the ID of the field to find the record for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | TableRelation Field."No." where(TableNo = field("Table ID")) |
| 53 | Source Field Caption | Text[250] | Specifies the caption of the field to find the record for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | FlowField: lookup(Field."Field Caption" where(TableNo = field("Table ID"), "No." = field("Source Field ID"))); not editable |
| 54 | Target Field ID | Integer | Specifies the ID of the field to get the value for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | TableRelation Field."No." where(TableNo = field("Table ID")) |
| 55 | Target Field Caption | Text[250] | Specifies the caption of the field to get the value for the field lookup. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | FlowField: lookup(Field."Field Caption" where(TableNo = field("Table ID"), "No." = field("Target Field ID"))); not editable |
| 56 | Field Lookup Rule | Option | Specifies the type of the field lookup. In case of Target the value from the Target Field ID will be taken as is, even if it is blank. In case of Original If Target Is Blank the original value will be taken if target one is blank. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 57 | Precision | Decimal | Specifies rounding precision. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 58 | Direction | Text[1] | Specifies rounding direction. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> |  |
| 70 | Extract From Date Type | Enum "Extract From Date Type" | Specifies what should be extracted from the date. <small>via [Page 1238 "Transformation Rule Card"](../page/1238.md)</small> | enum [Enum 1238 "Extract From Date Type"](../enum/1238.md) |

## Keys

- Key1: Code (clustered)

## Events published

- `OnTransformation(TransformationCode: Code[20]; InputText: Text; var OutputText: Text)` (integration)
- `OnCreateTransformationRules()` (integration)
- `OnBeforeIsDataFormatUpdateAllowed(FieldNumber: Integer; var DataFormatUpdateAllowed: Boolean; var IsHandled: Boolean)` (integration)
- `OnValidateLengthOnBeforeTestTransformationType(var TransformationRule: Record "Transformation Rule"; xTransformationRule: Record "Transformation Rule"; var IsHandled: Boolean)` (integration)
- `OnAfterTransformText(var TransformationRule: Record "Transformation Rule"; OldValue: Text; var NewValue: Text)` (integration)

## Trigger event subscribers

- OnBeforeDeleteEvent: [Codeunit 5397 "CDS Transformation Rule Mgt."](../codeunit/5397.md) OnDeleteTransformationRule

## Procedures

- `CreateDefaultTransformations()`
- `ValidateTransformationRuleField(FieldNo: Integer)`
- `IsDataFormatUpdateAllowed(): Boolean`
- `InsertRec(NewCode: Code[20]; NewDescription: Text[100]; NewTransformationType: Enum "Transformation Rule Type"; NewStartPosition: Integer; NewLength: Integer; NewDataFormat: Text[100]; NewDataFormattingCulture: Text[10])`
- `CreateRule(NewCode: Code[20]; NewDescription: Text[100]; NewTransformationType: Enum "Transformation Rule Type"; NewStartPosition: Integer; NewLength: Integer; NewDataFormat: Text[100]; NewDataFormattingCulture: Text[10])`
- `InsertFindAndReplaceRule(NewCode: Code[20]; NewDescription: Text[100]; NewTransformationType: Enum "Transformation Rule Type"; NewFindValue: Text[250]; NewReplaceValue: Text[250]; NextTransformationRule: Code[20])`
- `ReplaceRule(NewCode: Code[20]; NewDescription: Text[100]; NewTransformationType: Enum "Transformation Rule Type"; NewFindValue: Text[250]; NewReplaceValue: Text[250])`
- `ReplaceRule(NewCode: Code[20]; NewDescription: Text[100]; NewTransformationType: Enum "Transformation Rule Type"; NewFindValue: Text[250]; NewReplaceValue: Text[250]; NextTransformationRule: Code[20])`
- `TransformText(OldValue: Text): Text`
- `GetFourthToSixthSubstringCode(): Code[20]`
- `GetUSDateFormatCode(): Code[20]`
- `GetUSDateTimeFormatCode(): Code[20]`
- `GetUppercaseCode(): Code[20]`
- `GetLowercaseCode(): Code[20]`
- `GetTitlecaseCode(): Code[20]`
- `GetTrimCode(): Code[20]`
- `GetAlphanumericCode(): Code[20]`
- `GetDanishDecimalFormatCode(): Code[20]`
- `GetYYYYMMDDCode(): Code[20]`
- `GetYYYYMMDDHHMMSSCode(): Code[20]`
- `GetDeleteNOTPROVIDEDCode(): Code[20]`
- `GetAppendSpaceCode(): Code[20]` (obsolete 28.0: This is an unused procedure.)
- `EditNextTransformationRule()`
- `InsertAppendSpaceTransformation()` (obsolete 28.0: This is an unused procedure.)

Plus 1 local procedures.

## Triggers

OnInsert, OnModify

## Relations

- lookup page [Page 1237 "Transformation Rules"](../page/1237.md)
- Next Transformation Rule: TableRelation [Table 1237 "Transformation Rule"](../table/1237.md)

## Referenced by

6 fields in 6 objects relate to this table (TableRelation or CalcFormula).

- [Table 1225 "Data Exch. Field Mapping"](../table/1225.md): Transformation Rule
- [Table 1237 "Transformation Rule"](../table/1237.md): Next Transformation Rule
- [Table 1265 "Data Exch. Field Mapping Buf."](../table/1265.md): Transformation Rule
- [Table 5336 "Integration Field Mapping"](../table/5336.md): Transformation Rule
- [Table 5384 "Man. Int. Field Mapping"](../table/5384.md): Transformation Rule
- [Table 6118 "E-Doc. Mapping"](../table/6118.md): Transformation Rule

## Pages and codeunits on this table

- [Page 1237 "Transformation Rules"](../page/1237.md) (source table)
- [Page 1238 "Transformation Rule Card"](../page/1238.md) (source table)

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Page 1238 "Transformation Rule Card"](../page/1238.md) (1 call: `EditNextTransformationRule → (object)`)

## Implemented by

- [Codeunit 1243 "Transform. Rule - Custom"](../codeunit/1243.md)
- [Codeunit 1244 "Transform. Rule - Basic"](../codeunit/1244.md)
- [Codeunit 1245 "Transform. Rule - Formatting"](../codeunit/1245.md)
- [Codeunit 1246 "Transform. Rule - Field Lookup"](../codeunit/1246.md)
- [Codeunit 1249 "Transform. Rule - Replace"](../codeunit/1249.md)
- [Codeunit 1257 "Transform. Rule - Match"](../codeunit/1257.md)
- [Codeunit 1263 "Transform. Rule - Substring"](../codeunit/1263.md)
- [Codeunit 1264 "Transform. Rule - Round"](../codeunit/1264.md)
- [Codeunit 1265 "Transform. Rule - Ex. Fr. Date"](../codeunit/1265.md)
- [Enum 1237 "Transformation Rule Type"](../enum/1237.md)

## Across versions

- Present in: BC23-30
- Changed (declaration) in: BC24-25, BC28-29

## Deprecations

- procedure GetAppendSpaceCode: Pending 28.0 (#if not CLEAN28), "This is an unused procedure."
- procedure InsertAppendSpaceTransformation: Pending 28.0 (#if not CLEAN28), "This is an unused procedure."

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "table", object_name: "Transformation Rule")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
