@nabil.bamoh@hotmail.com yes you're right sorry ! So basically I have a table which stores number plates and are linked to customer , the customer can have multiple number plates. I would like that once you open the customer list page you could also filter with the number plates although they are stored in another table. I was trying to use the filterpagebuilder ,but it only seems that you can filter on only one table.
it depends on how you design the link between your customers and your plates.
If plates are linked as subpage then you cannot use SETTABLEVIEW on SubPage as it is not supported.
If plates are linked via an action, then you can apply your filter before you run the plates page.
Anyway, here is an example of FilterPageBuilder with two tables and where I filter on two tables and I use different functions than the link you provided:
PS1: Variables are: Customer (Table 18) and CustomerBankAccount (Table 287).
PS2: I used Customer Bank Account for this example because I think it should be similar to what you want to do with your "Plates".
PS3: I wrote the code in NAV 2016. You may need to adapt it if you use another version.
On another note, if I understand your requirement, you may have a look at "My Customer". It should be close to what you want to achieve
I hope this will inspire you find the right solution
In your case you might want to convert the view for the Customer table into a filter string for Customer."No.". You do this using the functions in Codeunit 46 SelectionFilterManagement.
Then you apply the view for the number plate table from the filter page to your page, as well as the filter for the customer no. to the corresponding field of the number plate table. To do the latter, either set the filter and view on a record and run the number plate page with that record, or create a function on the page that allows you to pass in that filter.
Answers
Do you know that "Yes" or "No" fully answers your question?
But I doubt this is what you're looking for.
Give more details about what you want to achieve and all the community will be glad to help you
If plates are linked as subpage then you cannot use SETTABLEVIEW on SubPage as it is not supported.
If plates are linked via an action, then you can apply your filter before you run the plates page.
Anyway, here is an example of FilterPageBuilder with two tables and where I filter on two tables and I use different functions than the link you provided:
MyFilterPageBuilder.ADDTABLE('Cust', Customer.RECORDID.TABLENO);
MyFilterPageBuilder.ADDFIELDNO('Cust', Customer.FIELDNO("No."));
MyFilterPageBuilder.ADDTABLE('Bank', CustomerBankAccount.RECORDID.TABLENO);
MyFilterPageBuilder.ADDFIELDNO('Bank', CustomerBankAccount.FIELDNO(Code));
MyFilterPageBuilder.RUNMODAL;
MESSAGE('Cust Filter = %1\Bank Filter = %2', MyFilterPageBuilder.GETVIEW('Cust'), MyFilterPageBuilder.GETVIEW('Bank'));
PS1: Variables are: Customer (Table 18) and CustomerBankAccount (Table 287).
PS2: I used Customer Bank Account for this example because I think it should be similar to what you want to do with your "Plates".
PS3: I wrote the code in NAV 2016. You may need to adapt it if you use another version.
On another note, if I understand your requirement, you may have a look at "My Customer". It should be close to what you want to achieve
I hope this will inspire you find the right solution
Then you apply the view for the number plate table from the filter page to your page, as well as the filter for the customer no. to the corresponding field of the number plate table. To do the latter, either set the filter and view on a record and run the number plate page with that record, or create a function on the page that allows you to pass in that filter.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!