Hi
I have flowfilter (date) defined in a flowfield. I'm trying to pass the the date filter when running a report so based on the date selected by end user, the flow field data is filtered:
Flow Fields on table
field(60003; Balance; Decimal)
{
FieldClass = FlowField;
CalcFormula = sum("G/L Entry".Amount
WHERE(
"Global Dimension 2 Code" = FIELD(Code),
"Posting Date" = field(DateFilterP1)
));
Caption = 'Balance';
}
field(60400; DateFilterP1; date)
{
Caption = 'Date Filter';
FieldClass = FlowFilter;
}
Report
trigger OnAfterGetRecord()//GL Entry
var
DimValue: Record "Dimension Value";
begin
begin
end;
begin
DimValue.SetRange(Code, "Global Dimension 2 Code");
DimValue.SetFilter(DateFilterP1, '%1..%2', 20220501D, 20220610D);//'%1..%2',
if DimValue.FindFirst() then
DimValue.CalcFields(Balance);
StartDim2Balance := DimValue.Balance;
end;