How to show time on form constantly updating?

p_vikas_goud
Member Posts: 16
Hi experts,
Please tell me
1.How to show systems time constantly updating?
I have tried with TIME function which is showing systems time, but it is not updating with the systems time.
2.I have created a form with three fields code1(code datatype), code2 (code), code3(code)
My question is when I type 'A' in the first field and 'B' in the second, then I should get 'AB' in the third field, is there any way to get.
Actually I got struckup with same kind of scenario
Help me out guys.
Please tell me
1.How to show systems time constantly updating?
I have tried with TIME function which is showing systems time, but it is not updating with the systems time.
2.I have created a form with three fields code1(code datatype), code2 (code), code3(code)
My question is when I type 'A' in the first field and 'B' in the second, then I should get 'AB' in the third field, is there any way to get.
Actually I got struckup with same kind of scenario
Help me out guys.
goood
0
Comments
-
Each form has a 'TimerInterval' property. Set this to for instance 1000 for one second, and the form will fire the OnTimer event every second. Put some logic into the trigger to update the textbox that holds your time.
So in your case I would think about adding a global variable 'MyTime', data type time, and set that as the 'SourceExpr' of a non-editable text box. Then in the OnTimer event, you program:MyTime := TIME; CurrForm.UPDATE;
and that should take care of it.
Depending on how accurate you want the time on your form to be, you can set this to any value you want, it is expressed in milliseconds.0 -
To show constantly updating time on a form:
You can either use the Forms own OnTimer() event or the Navision Timer automation controller. I would go for the later.
Create a text variable to hold the time and place a text box with this as the Source Expression: e.g., CurrentTime
Create an automation type variable which points to the Navision Timer 1.0 automation controller: e.g., Timer
Make sure you set the WithEvents property on the automation variable to Yes
Initialise your time and display:CurrentTime := FORMAT(TIME); CREATE(Timer); Timer.Interval := 1000; Timer.Enabled := TRUE;
Place this code on the Timer::Timer(Milliseconds : Integer) triggerCurrentTime := FORMAT(TIME); CurrForm.UPDATE;
In the example above, the clock will update every second. Change the interval to whatever you require.0 -
I think that complicates it needlessly. Every form has a built in timer, and that's the easiest way to go about updating the form every second. I do like the FORMAT suggestion, you can even format that in different ways. The basic idea is exactly the same though.0
-
-
Savatage wrote:
it is numbered - form 50100 and unless you purchased extra forms beyond the first 100 that you can't open it up. and if you are not a developer then you can not edit the text file and change the number to one you can use
and if you are like me and forgot that, and downloaded it, now you can not just delete it either, because you don't have premission to access it.
reading the description it says it is
This analog clock is build in obect F 50010
but it is actually 50100 not 50010
ops,0 -
themave wrote:reading the description it says it is
This analog clock is build in obect F 50010
but it is actually 50100 not 50010
ops,
Thanks for pointing that out, in a subtle way ;-)
I have changed the description. Will modify the object in a lower range, if you insist.No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)0 -
DenSter wrote:I think that complicates it needlessly. Every form has a built in timer, and that's the easiest way to go about updating the form every second. I do like the FORMAT suggestion, you can even format that in different ways. The basic idea is exactly the same though.
Don't think it's complictiong things - Both methods I think are viable though
Using the Navision Timer gives you a bit more control and scope to expand the functionality in the future if required.0 -
Luc Van Dyck wrote:themave wrote:reading the description it says it is
This analog clock is build in obect F 50010
but it is actually 50100 not 50010
ops,
Thanks for pointing that out, in a subtle way ;-)
I have changed the description. Will modify the object in a lower range, if you insist.
Don't know how many people will want/use it but to make life easier I think the fob should be changed to form 50088 or something. tho the text file does show you what you need to do to make your oen form.0 -
Savatage wrote:...Don't know how many people will want/use it but to make life easier I think the fob should be changed to form 50088 or something. tho the text file does show you what you need to do to make your oen form.
the end user form designer only allows you access to change how thing appear. but doesn't allow access to cal/code.
without application designer, the only place you can get to cal/code is in reports and dataports0 -
try this,
create new text box for timer, named it txtTime
create new variable timer as time
open property form, set TimeInterval = 1000
then in OnTimer trigger form, type this :
timer := time;
CurrForm.txtTime.UPDATE;
it will not affect on other objects in the form..
and will do correctly..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