How to link up form and table [ typical situation ]?

p_vikas_goud
Member Posts: 16
Hi experts,
I am new to Navision,please help me with problem
I created a form which consists of three fields, 1.Citycode(code datatype)
2.Place(Text) and 3.Distance(Int)
I want to get when I type Citycode, i should get Place and Distance filled automatically
Just as like when we give Postcode in Customer Card, City name is filled automatically.
I tried trying the same code as like customer card, but it not working,
please help me with this
I am new to Navision,please help me with problem
I created a form which consists of three fields, 1.Citycode(code datatype)
2.Place(Text) and 3.Distance(Int)
I want to get when I type Citycode, i should get Place and Distance filled automatically
Just as like when we give Postcode in Customer Card, City name is filled automatically.
I tried trying the same code as like customer card, but it not working,
please help me with this
goood
0
Comments
-
Did you create a table too?
You should probably have those three fields in a table. Then in the OnValidate trigger of the CityCode field you should have code that goes and looks up or calculates the other fields.
Usually the syntax is something likeOtherRecord.GET("CityCode"); Place = OtherRecord.Place;
I understand what you are trying to do, but I think we need more detail about your design.0 -
Thanks matttrax, for helping me in the problem, the solution which you gave is working.
Now ,please help me with the second situation
1.How can I show the system time on the Form?
What ways can I show 12hrs format and 24 hrs format?
What I am doing with this type of questions is
I am devoloping a project in prepaid taxi reservation system, where if the time is between 11:00PM to 05:00AM the bill shows 50% more than the actual value.
All sugesstions are welcomedgoood0 -
Hi,
You retrieve the system time using the TIME function. If you want to use this on a form where TIME is constantly updated to show the current time, I think you have to use the timer property of the form. You could set the TimerInterval to 1000 (=milliseconds) and then have a variable in the timer which takes its value from TIME, and then after that you update the controls on the form.
I haven't tried it, but it would look something like this I think..
// Put this in TimerInterval trigger
Variable := TIME;
CurrForm.UPDATECONTROLS;
// END
You can use FORMAT to display different formats of TIME. You can call FORMAT like this.. FORMAT(TIME,#,#) where # is a single number. The first # indicates how many characters of TIME should be shown and the second # gives a different format. You can use the MESSAGE functions to test the different formats...
//Just an example
MESSAGE('%1',FORMAT(TIME,4,1);
Once again, I haven't tried this out, but I think this is at least one way to solve your problem.
Cheers!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