Drag and drop field in dataport

Hi, I never knew this and with me a lot of others, maybe you are about to learn something too! You can drag and drop fields for the “field menu” into the “field desginer” of a dataport. And the best thing is, the Startpos and width are fill automaticly. Isn’t that nice? That is so nice!

Done it for years now [:)] Pity it’s not documented though. Good thing to give a notice about it. Anyone else have something to share? BTW: Have You ever used += and -= in Your code? /Lars

Hi Lars, IMHO it’s not such a good idea to use these c-style operators. They have been around in the platform for some time now, but HQ has never officially confirmed that they actually work. I would say that this implies that they can also be removed from C/SIDE withour prior notice, in effect breaking every application that uses them. Just stick to i := i + 1 etc.

Emiel, have you found the limitations of this yet? Admittedly, this might be fixed in Attain, but in V2.60 and earlier, if you tried to moved an entire table’s worth of fields (highlight them all and click in the field desginer) from the field menu, Navision simply bombs out if there are too many fields. Additionally, if you select certain fields only, by highlighting different fields, eventually Navision gets confused and starts randomly refusing to highlight certain fields. [xx(]

quote:


Originally posted by jhoek
Hi Lars, I would say that this implies that they can also be removed from C/SIDE withour prior notice, in effect breaking every application that uses them. Just stick to i := i + 1 etc.


If they do they will get problems with their own code. Look at codeunit 6500. //Lars

quote:


Originally posted by Lars Westman If they do they will get problems with their own code. Look at codeunit 6500.


Lars, I hate to admit it, but it seems you’re right [;)]. The use of += etc. is now considered “legal” by HQ. Their reasoning is, that variable names have become so long that these shorthand operators will really increase the readability of your code. Now all HQ needs to do is add them to the documentation, right?

Hi I dont come from the programmers side. Can you please enlighten me how it works ‘-=’ or ‘+=’. TIA bye André

In standard code you would say: Amount := Amount + NewAmount when using += you can say Amount += NewAmount It gives you the same result and is quicker to write… Enjoy your weekend everyone… Hope this makes sense…

You can also use ‘*=’ & ‘/=’

Thank to all. Have a nice weekend. bye André

Hi, += also works with Text but not with code !? Regards Simon

Another cool trick is if you want to select the date ranges in the fiscal year easily, you can just type in p1 in the date filter field. For example, if the first period in the current fiscal year is 01/01/03 to 01/31/03, type in p1 in teh date filter field will automatically fill in the date range. You can also type in m14 to bring up the 14th Monday of the year.

quote:


Originally posted by achowtc
Another cool trick is if you want to select the date ranges in the fiscal year easily, you can just type in p1 in the date filter field. For example, if the first period in the current fiscal year is 01/01/03 to 01/31/03, type in p1 in teh date filter field will automatically fill in the date range. You can also type in m14 to bring up the 14th Monday of the year.


Cool hint! But this works only if the setup of Accounting Period is OK. If not you will get on e.g. p1 the filter 01.01.2003…31.12.9999 [:(]. It cost me some heart attacks until I found this problem. Here are some other date calculations: J-1 =last year P-1 = last month bye André

ANyone else notice that the drag-and-drop fields form doesn’t scroll properly in 3.10? Makes it difficult to multiple select and then drag-drop.

Yes. This must have something to do with the vertical scroll that was introduced in 3.10. It messes things up in the field list.

quote:


Originally posted by eromein
Hi, You can drag and drop fields for the “field menu” into the “field desginer” of a dataport.


It looks like it does not work in 3.6. I used it in 2.6, but using the same steps I was not able to do it in 3.6. But still it works! You select the fields in Field Menu a then just simply click on the Field designer window, the system asks you “Do you want append the fields …” and thats’ it.

Another tip: In date fields try and type in mo, tu, we, th, fr, sa or su. This will give you monday, tuesday etc. in the current week. Of course, you should change the “mo” etc. to the corresponding first letters in the language of Navision. Also mo21 etc. will give you Monday in week 21 of the current year.

Hi Does somebody know what M stands for? If I type ‘M’ then I get today = Monday (like Lars explained). If I type ‘M-1’ then I get 30.12.02. If I type ‘M-2’ then I get 06.01.03. Big[?] bye André

Ok. I got it. M-1 = Monday in the first week of year = 30.12.02 (same as Lars explained!) bye André