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
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.
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)
Hi,
Can you try this CalcFormula=exist(MyTestData where (MyDate >= field("MyDate")));
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156