The AL developer preview is still evolving with frequent updates. Follow us on the Dynamics NAV Team Blog for the announcements.
Returns the ID that is assigned to a query column in the query definition.
Number := Query.COLUMNNO(Column)
A variable that specifies the query object that contains the column.
Refers to the name of the query column. The name of a query column is specified by the Name Property of the column in Query Designer.
Property Value/Return Value
The number that is assigned to the column.
In Query Designer, each column of the query is assigned a number that is specified by the column's ID Property. The COLUMNNO method enables you to create actions based on the ID of a column.
The following example shows how to get the ID of a column of a query. The query is called My Customer Query and has a column with the name Customer_No. This example requires that you create the following variables.
|MyQuery||Query||My Customer Query|
This statement assigns the ID of the Customer_No column in the My Customer Query query to the
Number := MyQuery.COLUMNNO("Customer_No");