Change from field("fieldName";"FieldSource") to field("fieldSource";"fieldName") for Page fields?
This seems backwards as in NAV the GUI by default presents the source then caption columns in pages/reports.
Usually when adding a field to a page the caption or name stays the same as the name in the table, the exception is to change the name.
If the Source was first the snippet syntax could enumerate the value of auto-complete to the fieldName.
Snippet: "body": [ "field("${1:FieldSource}";"${1:fieldName}")", "{", "\t$0", "}" ],
So it would look like this:

The inconsistency with NAV GUI is a good point. However, we need to consider consistency between AL language elements as well. Currently all language elements have name as the first parameter unless an element has an ID. Utilizing the snippet fields to auto populate the other parameter is a good suggestion, we will look more into it.
Yes, irregardless of if I think the parameters are backwards, the main goal is that there is a way to quickly pick and populate the field name and filed source. :)
At least your are getting parameters on snippets. In "Preferences : User Settings" I've tried "editor.snippetSuggestions": "inline", "top" and also "bottom". No matter which I choose, I don't get a suggestion that includes placeholders for parameters. I simply get the "()". I've got "editor.tabCompletion": false, "editor.quickSuggestions": true, and still I get nothing of any real use. As an example, when I type in "field", I simply end up with "field()".
I also have yet to find a definition of the parameters for the "field" object anywhere in the documentation. I would guess it is in the documentation somewhere, but it seems to be very difficult to find. I've found "examples", but no definitions. Without parameter suggestions in VS Code or a definition in the documentation, this has been more of an issue than it would otherwise be.
@DaveBoehmPBSI all snippets are prefixed with a letter t (for template). Have you tried using tfield for example?
Thanks for the reply, Stanislaw.
Actually, I have been using these. The snippets are great, but there are other instances where intellisense simply doesn’t give enough information.
As an example, I was working on an AL program extension today. I was trying to determine how to code the “RunPageLink” property for a “RunObject”. The MSDN NAV documentation basically describes how to set this parameter in C/Side. Of course, C/Side doesn’t exist in the new development environment.
After several hours of searching, I was finally able to find an example of a bug in NAV 2013 where the blogger showed a visual that included the property as set in C/Side. From that, I was eventually able to guess how to program it in the new development environment (i.e. AL on VS Code).
I spent several hours searching and guessing. I don’t expect Microsoft to issue proper documentation for the “new NAV development environment” for quite some time. In the meantime, better intellisense would be wonderful.
Actually, an Object Browser would nearly be a godsend!
Thanks,
--Dave--
David Boehm, CPA, MBS Certified Professional PBSI www.pbsisoftware.comhttp://www.pbsisoftware.com/ to book an appt.: https://outlook.office365.com/owa/calendar/[email protected]/bookings/ Office: 940.648.2526tel:940.648.2526 Cell: 214.392.4797tel:214.392.4797
This communication, along with any documents, files or attachments, is intended only for the use of the addressee and may contain legally privileged and confidential information. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of any information contained in or attached to this communication is strictly prohibited. If you have received this message in error, please notify the sender immediately and destroy the original communication and its attachments without reading, printing or saving in any manner. Thank you.
From: Stanislaw Stempin [mailto:[email protected]] Sent: Tuesday, April 4, 2017 7:10 AM To: Microsoft/AL [email protected] Cc: Dave Boehm [email protected]; Mention [email protected] Subject: Re: [Microsoft/AL] Change from field("fieldName";"FieldSource") to field("fieldSource";"fieldName") for Page fields? (#103)
@DaveBoehmPBSIhttps://github.com/DaveBoehmPBSI all snippets are prefixed with a letter t (for template). Have you tried using tfield for example?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/AL/issues/103#issuecomment-291480570, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYzmJzLqN9Jpmcwt_Y8_gLnrSbApbkOvks5rsjMkgaJpZM4MMSQd.
I’ve been using the code snippets, and I suppose the approach in VS Code just takes some getting used to…
--Dave--
David Boehm, CPA, MBS Certified Professional PBSI www.pbsisoftware.comhttp://www.pbsisoftware.com/ to book an appt.: https://outlook.office365.com/owa/calendar/[email protected]/bookings/ Office: 940.648.2526tel:940.648.2526 Cell: 214.392.4797tel:214.392.4797
This communication, along with any documents, files or attachments, is intended only for the use of the addressee and may contain legally privileged and confidential information. If you are not the intended recipient, you are hereby notified that any dissemination, distribution or copying of any information contained in or attached to this communication is strictly prohibited. If you have received this message in error, please notify the sender immediately and destroy the original communication and its attachments without reading, printing or saving in any manner. Thank you.
From: Stanislaw Stempin [mailto:[email protected]] Sent: Tuesday, April 4, 2017 7:10 AM To: Microsoft/AL [email protected] Cc: Dave Boehm [email protected]; Mention [email protected] Subject: Re: [Microsoft/AL] Change from field("fieldName";"FieldSource") to field("fieldSource";"fieldName") for Page fields? (#103)
@DaveBoehmPBSIhttps://github.com/DaveBoehmPBSI all snippets are prefixed with a letter t (for template). Have you tried using tfield for example?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/AL/issues/103#issuecomment-291480570, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AYzmJzLqN9Jpmcwt_Y8_gLnrSbApbkOvks5rsjMkgaJpZM4MMSQd.
This suggestion has been implemented in the upcoming May Update. The order of the parameters hasn't been changed but Intellisense will suggest a list of table fields to choose from and populate both the name and the source expression.