Skip to main content

Notifications

Microsoft Dynamics NAV (Archived)

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

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

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,745 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
    tpokorra 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
    CDsilva 4,184 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans