# LinkFields Property
> Version: _Available or changed with runtime version 1.0._
Specifies the fields that are linked between two tables using the LinkTable Property. This property is only available for XML items that have a table as their data source.
## Applies to
 Xml Port Table Element
## Property Value
Value|Description
`<field>`|A field from the table that is specified as the data source of this XML item
`<reference field>`|A field from the table that is specified in the devenv-linktable-property.
## Syntax
```al
LinkFields = <field>=FIELD(<reference field>)
```
## Remarks
This property works in combination with the devenv-linktable-property and the devenv-linktableforceinsert-property.
The property sets a filter on the table that is the data source for the XML item. The filter selects only those records that contain the same `<field>` value in source table as the `<reference field>` value from the table specified in devenv-linktable-property.
For example, you have defined two XML items; one based on the Customer table that contains a list of customers and one based on the Sales Header table that contains a record of each sales order that has been made.
In the Customer table, the primary key is the customer number and is stored in the No. field. In the Sales Header table that contains the sales data, each record contains this customer number as a foreign key in the field called Sell-to Customer No.
Setting the devenv-linktable-property of the second XML item to point to the Customer table and setting the Linkfields property of the first XML item to point to the Sell-to Customer No. field places a filter on the records in the Customer table. This means that only those records in the Sales Header table that refer to the current customer are selected.
The same result can be obtained by placing this AL statement in the ../triggers-auto/xmlporttableelement/devenv-onprexmlitem-xmlporttableelement-trigger of the child data item.
```al
SetRange("Sell-to Customer No.",Customer."No.");
```
## Related information
devenv-linktable-property
devenv-linktableforceinsert-property

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-linkfields-property, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-linkfields-property/
