There is a new datatype
introduced in NAV 2016 and it is called FilterPageBuilder, this datatype can
be used to create a filter page that enables users to set filters on multiple
tables. The page can have multiple controls i.e. multiple records and you can
use that to capture filters on the records.
The following are the functions that are available for this datatype.
1. ADDTABLE
1. ADDRECORD
1. ADDRECORDREF
1. ADDFIELD
1. GETVIEW
1. SETVIEW
1. RUNMODAL
1. COUNT
1. NAME
Following is an example how it can be used
FilterPageBuilder ---- SubType of FILTERPAGEBUILDER
FilterPageBuilder.ADDTABLE(‘Customer Table’,DATABASE::Customer);
FilterPageBuilder.ADDTABLE(‘Item Table’,DATABASE::Item);
FilterPageBuilder.RUNMODAL;
The above code will open the following page
[](http://lh3.googleusercontent.com/-O1304SLlNYc/VhMvuxc3LQI/AAAAAAAAJq0/TXbnFUDLYMY/s1600-h/image%25255B4%25255D.png)
You can also specify the field like we do using ReqFilterFields property on
the request page of the report using ADDFIELD function below is another
example
Customer is the record variable of Customer Table
FilterPageBuilder.ADDRECORD('Customer Table',Customer);
FilterPageBuilder.ADDFIELD('Customer Table',Customer."No.");
FilterPageBuilder.RUNMODAL;
As you can see the first parameter should match with ADDRECORD to let the
control know which field to show.
[](http://lh3.googleusercontent.com/-PPSpyJ72gsA/VhMvvxAyqoI/AAAAAAAAJrA/ex62HOIeAvM/s1600-h/image%25255B11%25255D.png)
Once the user sets the filter on the page, we can get the filters from the
page using GETVIEW function of the FilterPageBuilder and then set that to
another record.
Ex. Customer2.SETVIEW(FilterPageBuilder.GETVIEW(Customer)); Where Customer2 is
another customer record variable.
Would you like to know what has changed in update 18.3? Below you’ll find an overview and relevant links to what has been done on hotfixes and regulatory fea...
In the version, BC 18.1 minor update Microsoft released a change where you can attach the documents you have attached to the source document, previously if y...
Leave a comment