Regarding - Filtering and transferring data from one page to the other page using Al code

Hi All,

I HAVE STUCK IN THE FILTERING PART …

AS MY PLAN IS ,

As I have created 2 pages ,

What I want is to the data in 1 st page should get filtered based on the status (open/close)" open" .The data which has the status (open) only should get filtered and that alone should taken to the 2nd page .

Is that possible, If yes does anybody help me with the procedure of the code?

Thanks in advance…

Yes, it is possible to filter the data in the first page based on the “open” status and display the filtered data on the second page. Here is a sample code to achieve this:

  1. In the OnOpenPage trigger of the first page, write the following code to filter the data:

YourTable.SETFILTER(Status, YourTable.Status::Open);

Replace YourTable with the name of the table that contains the Status field.

  1. In the OnOpenPage trigger of the second page, write the following code to display the filtered data:

MyTableView.CREATE(YourTable);
MyTableView.SETRANGE(Status, YourTable.Status::Open);
MyTableView.RUN;

Replace YourTable with the name of the table that contains the Status field, and MyTableView with the name of the temporary view that you want to create to display the filtered data.

This code creates a temporary view (MyTableView) based on the filtered data from YourTable, and then runs the view to display the data on the second page.

Note: If you want to refresh the filtered data on the second page whenever the user navigates back to the first page and changes the filter status, you can add the same code in the OnAfterGetCurrRecord trigger of the first page.