Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Is it possible to change the field caption with the value of another table field.

(0) ShareShare
ReportReport
Posted on by 68

if it is possible to do then please help me to archive this. Here I tried by assigning the same field value. But I am unable to get the value of a field that is from another table.

pastedimage1651682406411v2.png

  • Verified answer
    Umang Srivastava Profile Picture
    100 on at
    RE: Is it possible to change the field caption with the value of another table field.

    you can check the below code in page sales order subform where shortcut dimensions are shown on the basis of different dimensions values selected in GL setup.

    field(ShortcutDimCode3; ShortcutDimCode[3])

                   {

                       ApplicationArea = Dimensions;

                       CaptionClass = '1,2,3';

                       TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(3),

                                                                     "Dimension Value Type" = CONST(Standard),

                                                                     Blocked = CONST(false));

                       Visible = DimVisible3;

                       trigger OnValidate()

                       begin

                           ValidateShortcutDimension(3);

                       end;

                   }

    to setup like the above one now you need to define the caption likewise in codeunit 343 "Dimension CaptionClass Mgmt" you can have a look on this codeunit it will give you better idea to achive custom caption.

  • Verified answer
    YUN ZHU Profile Picture
    78,828 Super User 2025 Season 1 on at
    RE: Is it possible to change the field caption with the value of another table field.

    Hi, hope the following will help.

    https://yzhums.com/13188/

    Thanks.

    ZHU

  • Verified answer
    Techworld Profile Picture
    106 on at
    RE: Is it possible to change the field caption with the value of another table field.

    Hi,

    If you mean that you have another dimension which you are using in Business Central apart from Global Dimension 1 and 2 and you want to display the name Caption Dimension Code of dimension selected on Customer Card then you can use Caption Class by changing Last Value in Caption class 1,2,3 or 1,2,4 it will appear for the Dimension selected on General Ledger Setup.

    and adding two fields in Table Extension

     field(90000; "SD 3 Code"; Code[20])
            {
                Caption = 'SD 3 Code';
                CaptionClass = '1,2,3';
                TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(3),
                                                              Blocked = CONST(false));

                trigger OnValidate()
                begin
                    ValidateShortcutDimCode(3, "SD 3 Code");
                end;
            }
            field(90001; "SD 4 Code"; Code[20])
            {
                Caption = 'SD 4 Code';
                CaptionClass = '1,2,4';
                TableRelation = "Dimension Value".Code WHERE("Global Dimension No." = CONST(4),
                                                              Blocked = CONST(false));

                trigger OnValidate()
                begin
                    ValidateShortcutDimCode(4, "SD 4 Code");
                end;
            }

    Is your organization anyhow is using more than 8 Dimension and you want to reflect 9th Dimension value is it the Case,?

  • Suggested answer
    Nitin Verma Profile Picture
    21,394 Moderator on at
    RE: Is it possible to change the field caption with the value of another table field.

    Hi DyavariS ,

    You please refer any matrix page in the system, for ex. Item by location, see the image below, please check this page in design mode, it will help you to understand how to change field caption dynamicaly.

    pastedimage1651729584176v1.png

    Thanks.

  • Dyavari Sandeep Yadav Profile Picture
    68 on at
    RE: Is it possible to change the field caption with the value of another table field.

    Thanks for the reply @tanya kharbanda. Here I am doing the task on dimensions. There I Have to display the related values based upon the caption.

  • Verified answer
    tanya07 Profile Picture
    1,615 on at
    RE: Is it possible to change the field caption with the value of another table field.

    Hi,

    Why would you want to change the field caption with the value of another table field?

    Can you please elaborate more?

    You can definitely assign the value of one field to another.

    Thanks,

    Tanya Kharbanda

    Don't forget to help the community by verifying the answer if your question has been answered. It will let others know that the topic has a verified  answer.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,910 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,782 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans