Hi,
I'm trying to populate a filtered list on a report based on the value that is selected on another filter that was selected:


First I'm getting the Sales Order Numbers and Lot Numbers populated with custom filters.
If I 'hard code' then I can get the lot numbers populate but the selection is not working as the lot number is a Primary key on the Lot table
trigger OnPreDataItem()
begin
SetRange("Source No. 3", LotNumberFilter);
end;
trigger OnPreDataItem()
begin
SetRange("No.", SoNumberFilter);
end;
1) How can I get the value from the filter that is selected on the Sales Order Number
2) How can I create a 'lookup' or table relation so that the Lot Numbers will only populate according to the value that was selected on the first filter
}
group(General)
{
field(SoNumberFilter; SoNumberFilter)
{
TableRelation = "Sales Line"."Document No.";
ApplicationArea = All;
Caption = 'Please filter on a Sales Order Number: ';
}
field(LotNumberFilter; LotNumberFilter)
{
//TableRelation = "Lot No. Information"."Lot No.";
TableRelation = "Sales Line"."No." WHERE("Document No." = const('SO10190'));
ApplicationArea = All;
Caption = 'Please filter on a Lot Number: ';
}