How do I save name of item attributes on my own table?

Hi experts,

I have made an extension to Business Central cloud.

On my own table, I would like to have a field, where the user can select one of the item attributes and save the selected item attribute on my table.

The problem is that item attributes have an integer as unique key and I only want my user to see the name of the item attribute, when he/she selects it.

For instance, if I have these item attribute records:

1, Weight

2, Color

3 Height

then I want the user to select between Weight, Color and Height and it must only be the selected value (eg. "Color"), that is shown in my new field on my new table.

How do I do that?

I have these two files:

table 50101 "myTable"
{
Caption = 'my';

fields
{
field(1; Code; Code[10])
{
Caption = 'Code';
NotBlank = true;
}
field(2; Description; Text[50])
{
Caption = 'Desc.';
}
field(3; "Item Attribute 1"; Integer)
{
Caption = 'No. 1';
TableRelation = "Item Attribute".ID;
}
}

keys
{
key(Key1; Code)
{
Clustered = true;
}
}
}
Page 50102 "myPage"
{
Caption = 'Well';
PageType = List;
SourceTable = myTable;
ApplicationArea = All;
UsageCategory = Lists;

layout
{
area(content)
{
repeater(Group)
{
field("Code";Rec.Code)
{
ApplicationArea = All;
ToolTip = 'Well';
}

field(Description;Rec.Description)
{
ApplicationArea = All;
ToolTip = 'Well';
}

field("Item Attribute 1";Rec."Item Attribute 1")
{
ApplicationArea = All;
ToolTip = 'Well';
}
}
}
}
}
Sign In or Register to comment.