web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

How to filter by comparing with other field in CalcFormula in FlowField

(0) ShareShare
ReportReport
Posted on by 25

This works:

CalcFormula=exist(MyTestData where (MyDate = field("MyDate")));

But when I want to compare the dates like this:

CalcFormula=exist(MyTestData where (MyDate = filter (> field("MyDate"))));

I get a syntax error, at the opening bracket in field("MyDate").

Is this a bug, a missing feature, or is there another way to achieve this?

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Suresh Kulla Profile Picture
    49,609 Super User 2025 Season 2 on at
    RE: How to filter by comparing with other field in CalcFormula in FlowField

    You cannot apply a filter based on the field it has be a constant. The only way to achieve that is by creating a calculating field which you calculate the value onaftergetrecord of that page.  The field will not be part of the table it will be just a variable which you will calculate and use it on the page.

  • tpokorra Profile Picture
    25 on at
    RE: How to filter by comparing with other field in CalcFormula in FlowField

    Unfortunately, this also does not work:

    CalcFormula=exist(MyTestData where (MyDate >= field("MyDate"))));

    the error messages are:

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,56): error AL0104: Syntax error, '=' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,56): error AL0104: Syntax error, 'field' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,56): error AL0292: 'FIELD', 'CONST' or 'FILTER' keyword is expected.

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,56): error AL0104: Syntax error, ')' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,59): error AL0104: Syntax error, ';' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,59): error AL0104: Syntax error, '}' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,65): error AL0114: Syntax error, integer literal expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,65): error AL0104: Syntax error, ';' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,73): error AL0104: Syntax error, ';' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,73): error AL0107: Syntax error, identifier expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,74): error AL0104: Syntax error, '{' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,74): error AL0104: Syntax error, '}' expected

    c:\Users\timotheusp\Documents\AL-Examples\FlowFields\tab50110.MyTableFlowFieldTest.al(33,74): error AL0198: Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, codeunit, report, xmlport, query, controladdin)

  • CDsilva Profile Picture
    4,188 on at
    RE: How to filter by comparing with other field in CalcFormula in FlowField

    Hi,

    Can you try this CalcFormula=exist(MyTestData where (MyDate >= field("MyDate")));

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

#1
Saurav.Dhyani Profile Picture

Saurav.Dhyani 2 Super User 2025 Season 2

#2
RK-25090803-0 Profile Picture

RK-25090803-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans