Sign Up for Training |
Jet Global Company Site
Submit a Request
Give Feedback

Introducing the NF Function

Related Articles...


The NL function works great if we want a single field from a record, but if we want to retrieve more than one field from the same record, retyping all the filters for each field can be tedious.

The NF function provides a fast way get multiple fields from our NL. 

NAV Cronus Example

SQL AdventureWorks Example

With AdventureWorks, the following report lists CustomerIDs with their City and Phone.


The BusinessEntityID uniquely identifies each customer, so we make a list of BusinessEntityID, then use it as a filter to get the LastName and Phone for each customer.  A sample of the output of this report is listed below.


The NF function is a shortcut that will return the value of a field in a record.  One or more NF functions can be used with a single NL function that has the NL field parameter left blank.  The report listed above can be created with much less typing by using this method.  The simpler version of the report is shown below.


As we can see, the second version requires much less typing.

Unlike in the Dynamics NAV example listed above, the vAddiitionalContactInfo table in the AdventureWorks database does not include a pre-defined primary key to uniquely identify the records.  Thus, the list of fields in the NL function is enclosed in brackets {} and must include all of the fields we want to use in the NF functions.

The first parameter of the NF function has a cell reference to the NL function, and the second parameter is the name of the field in which we are interested.  Note that this type of NL function returns what is called a record key, which will be discussed later.

A sample of the output of the report is listed below.


As we can see, the first column does not contain information that we want to see on the report so we have hidden this column (see Automatic Hidden Columns, Sheets and Rows).

If our table were set up to include a primary key, we could can just leave the Field parameter in the NL function blank and Jet Reports would take care of the rest.  Then, the report would look more like this:


If there is no primary key in the table, Jet Reports will give an error message if weleave the Field parameter of the NL blank so we can try leaving the Field blank, then fill in a list of field names if necessary.

Was this article helpful?
0 out of 1 found this helpful
Have more questions? Submit a request