Easy Basic Questions about table views

Manuel_A.
Member Posts: 22
Hello.
Im new to programming and today i got my first project. Ive got a very simple question i guess. I hope no one minds about basic questions?
I have created my own table and form. Now i want to access another table (Employees).
I want to select the Employee Code and then want to automatically update some fields like First Name and Lastname with the content of the selected Code.
What do i have to do ?
Thanks for your answer.
Im new to programming and today i got my first project. Ive got a very simple question i guess. I hope no one minds about basic questions?
I have created my own table and form. Now i want to access another table (Employees).
I want to select the Employee Code and then want to automatically update some fields like First Name and Lastname with the content of the selected Code.
What do i have to do ?
Thanks for your answer.
0
Comments
-
There are 2 main ways to do this and it will depend on what elements of the primary key you are able to specify. In this case the primary key is "no." so you could use the GET command:specify a variable:
Emp REC 5200
On Validate () of the employee Code
Emp.Get("Employee Code");
"First name":=Emp."First name";
"Last name":=Emp."Last Name";specify a variable:
Emp REC 5200
On Validate () of the employee Code
Emp.Setrange("Employee Code");
if Emp.Find('-') then begin //find first record match
"First name":=Emp."First name";
"Last name":=Emp."Last Name";
end;
Hope that helps.
DeanRemember: Keep it simple0 -
Or, if you don't need the ability to change the other fields (if they are for information only), you should make the other fields flowfields that lookup into your employee table, and Navision will update those automatically.0
-
Thanks for your help!
Now i can continue working on the project till my next problem0
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