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

MortenSteengaard
Member Posts: 144
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';
}
}
}
}
}
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';
}
}
}
}
}
0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions