{"title":"DataCaptionFields Property","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/properties/devenv-datacaptionfields-property/","by":"JOP-AL","license":"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-datacaptionfields-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.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-datacaptionfields-property","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Sets the fields that appear to the left of the caption on pages that display the contents of this table.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":2,"title":"Applies to","slug":"applies-to","at":165,"chars":41},{"level":2,"title":"Syntax","slug":"syntax","at":206,"chars":81},{"level":2,"title":"Remarks","slug":"remarks","at":287,"chars":11},{"level":2,"title":"Card pages","slug":"card-pages","at":298,"chars":337},{"level":2,"title":"Tabular pages","slug":"tabular-pages","at":635,"chars":600},{"level":2,"title":"Example of usage","slug":"example-of-usage","at":1235,"chars":1063},{"level":2,"title":"Key takeaway","slug":"key-takeaway","at":2298,"chars":251},{"level":2,"title":"Related information","slug":"related-information","at":2549,"chars":40}],"text":"> Version: _Available or changed with runtime version 1.0._\nSets the fields that appear to the left of the caption on pages that display the contents of this table.\n## Applies to\n Table\n Request Page\n Page\n## Syntax\n```al\nDataCaptionFields = \"Customer Name\", \"Company Display Name\";\n```\n## Remarks\n## Card pages\nCard pages display a single record at a time. For this page type, the value of the DataCaptionFields property is taken from the underlying table. Any value set for this property on the page itself is ignored. If the DataCaptionFields property isn't defined on the table, the primary key of the table is used as a fallback.\n## Tabular pages\nTabular pages display multiple records simultaneously. For these pages, a data caption is shown only if a filter applied to the fields defined in the DataCaptionFields property evaluates to a single value. Two situations can occur:\n With a table relation: If a table relation exists (as defined by the devenv-tablerelation-property) the DataCaptionFields from the underlying table is used. If the related table doesn't define this property, the primary key is used.\n Without a table relation: If no table relation exists, the single value resulting from the filter is used directly.\n## Example of usage\nThe following example illustrates how the DataCaptionFields property is used.\nThe Customer Card page (ID 21) is based on the Customer table (ID 18). Using the Navigate menu on this page, users can open other pages, including the Customer Ledger Entry page (25).\nIn the Customer table, the DataCaptionFields property is set to No., Name. On the Customer Ledger Entry page, the DataCaptionFields property is set to Customer No.. When the Customer Ledger Entry page (ID 25) is opened from the Customer Card page (ID 21), a filter is set on the Customer No. field of the Customer Ledger Entries table, showing only entries related to the currently displayed customer on the Customer Card. This is achieved by setting the RunPageLink property of the menu item that invokes the Customer Ledger Entry page to `Customer No.=Field(No.)`.\nIf you view the Customer Ledger Entry page with a filter applied, the customer name and number appear to the left of the caption on the Customer Ledger Entry page. If you remove the filter, the caption disappears.\n## Key takeaway\nThe DataCaptionFields property doesn't directly add captions to a page. Instead, it works in conjunction with the table-level configuration and other properties, such as RunPageLink to provide meaningful captions in specific contexts.\n## Related information\ndevenv-properties"}