Arranging Fields on Page

SteveDesmedtSteveDesmedt Member Posts: 3
edited 2020-05-02 in NAV Three Tier
Dear all,

I'm new on business central and trying to make some pages. I'm struggling with the alignment of fields on pages.
Let me try to explain:

I've created a page of type card where i have three groups defined
group("Address & Contact")
            {
                Caption = 'Address & Contact';
                group(AddressDetails)
                {
                    Caption = 'Address';
                    field(Address; Address)
                    {
                        ToolTip = 'Specifies the location address.';
                    }
                    field("Address 2"; "Address 2")
                    {
                        ToolTip = 'Specifies additional address information.';
                    }
                    field("Post Code"; "Post Code")
                    {
                        ToolTip = 'Specifies the postal code.';
                    }
                    field(City; City)
                    {
                        ToolTip = 'Specifies the city of the location.';
                    }
                    field("Country/Region Code"; "Country/Region Code")
                    {
                        ToolTip = 'Specifies the country/region of the address.';
                    }
                }
                group(ContactDetails)
                {
                    Caption = 'Contact';
                    field("Contact Name"; "Contact Name")
                    {
                        ToolTip = 'Specifies the name of the contact person at the location';
                    }
                    field("Phone No."; "Phone No.")
                    {
                        Importance = Promoted;
                        ToolTip = 'Specifies the telephone number of the location.';
                    }
                    field("E-Mail"; "E-Mail")
                    {
                        ExtendedDatatype = EMail;
                        ToolTip = 'Specifies the email address of the location.';
                    }

The field "Country/Region Code" switches to the right column while i want it to stay on the left under the Address group. I've added a screenshot of the as-is alignment and the requested to-be situation. (copy paste can do a lot) :smile:

Hope someone can help me.

Kind regards

Steved91ed1cdg30e.png






Answers

  • TallyHoTallyHo Member Posts: 417
    I took a quick look on the customer card, Address & Contact fasttab.

    dxgr5ssyp9hy.png

    Grouping is used to achieve this:

    group("Address & Contact")
    {
    group(AddressDetails)
    {
    field(Address;Address)
    {
    }
    field("Address 2";"Address 2")
    {
    }
    field("Country/Region Code";"Country/Region Code")
    {
    }
    field(City;City)
    {
    }
    group(Control10)
    {
    field(County;County)
    {
    }
    }
    field("Post Code";"Post Code")
    {
    }
    field(ShowMap;ShowMapLbl)
    {
    }
    }
    group(ContactDetails)
    {
    field("Primary Contact No.";"Primary Contact No.")
    {
    }
    field(ContactName;Contact)
    {
    }
    field("Phone No.";"Phone No.")
    {
    }
    field("E-Mail";"E-Mail")
    {
    }
    field("Fax No.";"Fax No.")
    {
    }
    field("Home Page";"Home Page")
    {
    }
    field("Language Code";"Language Code")
    {
    }
    }
    }
Sign In or Register to comment.