Usage of Indicators on Forms

Hi, I have a question regarding usage of Indicators on a form. On the toolbox there is an Indicator specified. I would like to use that. But how does it work? Can anyone explain that? Thanks. Roelof de Jong.

Indicators are great, I use them all the time. All you need, is to specify an integer between 0 and 10,000 as the source expression. Try this:In the Customer Table, add the following function: **AvailableCredit() : Integer** IF "Credit Limit (LCY)" = 0 THEN EXIT(10000); CALCFIELDS("Balance (LCY)"); EXIT(ROUND("Balance (LCY)" / "Credit Limit (LCY)" * 10000,1)); Then in the custoemr card (or list) add an Indicator, with the source expresssion “AvailableCredit”. Good luck.

Be very, very, very, very carefull with this. Updating a dialog takes a lot of performance. Please make sure you update your dialog as little as possible. do something like this. IF Value MOD 100 = 0 THEN UPDATE.Dialog(1,Value)

hi roelf, the value is calculated using this equation value := ((value of source expression - min value) / (max - min) * 100) hope this should give you a better picture. regards venax

Emiel, this is an indicator on a form, NOT a dialog box? Were you thinking of something else. Roelof what I said stands. [8]

Hi all, Thanks for all the help. I was able to set it up and it worked fine. But now I have an other problem. I would like to have a form run with a timer. What I want to make is a form which runs dataports in a loop. I would like to create a progression bar and to update this in the timer. It doesnt seem to work. Any suggestions? Thanks! Roelof de Jong.

Not sure what you do in your form, but somewhere in there you will probably need a CurrForm.Update(false);

David, Oops… Read the post to quick. BUT!, CurrForm.Update(false)-ing the form every x second, should slow the system down even more! I’m I right?

Yes, that doesn’t work. But it depends also on how quick you set the timer. I tried all the options but no result. Basically what I want to achieve is a form what runs a timer. This timer is running a table (repeat… until). In this table I have set all issues like which object to run with a setup. I also added to this table a field called progression. It’s an integer. On the form I have attached this field to a progression control from the toolbox. It would be nice to trigger somehow the progression and display it as a progressionbar on screen. Any ideas?

Then just update the field, you don’t have to update the whole form if you don’t need to. CurrForm."MyIndicatorControl".UPDATE; should work.

PS: it would reallly help, that if you asked the whole question in the begining, instead of piece meal. Now you have a whole bunch of unrelated answers. If I were to reread everything here again now, and then answer, my answer would be: Why can’t you start by using Navision’s inbuilt functionality? Forms 6090 thru 6095 seem to do exactly what you are asking?[:(!] I know the layout is not perfect, but it works.

nice one david!

Well David, the answer is very simple. First thhe customer doesn’t have the granule for it and second, what I am programming and the customer wants is not covering the Job Scheduler. But thanks for your answer anyway. [8D] Roelof.

This is difficult to answer of course, since your NSC agreement specifically prohibits you from duplicating Navision code if the purpose is to avoid paying license fees, and we know that every one follows this rule right [;)]. In any case the scheduler is a good place to start, but to be honset it does not look much like Navision code, and is very sloppy in its implementation and completeness. So this probably justifies you starting from scratch [:D] In any case at least the idea is there. So in this case look at he way the scheduler works, use the ideas, and implement what he customer needs. Just out of curiosity, what is it the client needs that the scheduler does not handle. As I see it the biggest problem with the scheduler, is that it only allows you to launch one task on one computer.

Well, in my scheduler you can setup different kinds of object setups (layouts). You can define which objects you want to run (dataports, reports or codeunits). For dataports you can define separate your in and out subdirectories, attach import/conversion sequence-nos when importing data. There is a special section for converting web-data into SalesOrders what we wrote for a client who uses Amazon.com filelayouts. And then additionally I would like to have indicators running for each separate object when it is currently running. But up till now I didnt succeed. Roelof.

I agree, that the way the scheduler is just doesn’t allow you to select what to run and what not to run, I build one based on a journal type screen, so you can craete your own batch, and each user runs their own. The journal is also used to pass basic paramaters. Its a pitty about the scheduler, so close to a good thing, and really no room left in it to fix it. AS for web conversions etc. Those things don’t really (and probably shouldn’t) be a part of the scheduler, really they should be external to it, but I can see that if you are trying to create progress indicators, then it may seem that you really don’t have much option. Though I did find one [:D] What I do is create Maintinence screen. In this, since we can access the current version, and making the assumption that we can COMMIT within the routine (be careful here). I have the called routine update a field that indicates its progress. Then I can use my progress window as I like. Also I can then log in through Citrix as required, and see who is doing what. I also put a timmer on it, so that if the counter field is not updated after 30 seconds, then I assume it has crashed. The first version of this I wrote for a Client in 1998 (on version 2.00 before we had OnTimmer), and so far it has run 24 hours a day since then no problems.

Be carefull not to overflow the “Navision” integer limit if you have too many records. from -2,147,483,647 to 2,147,483,647.

David, Maybe we exhange some objects sometime. That would be interesting. Roelof.