Quantcast
Channel: Martin Dráb's Activities
Viewing all articles
Browse latest Browse all 17532

Computed Column Dates

$
0
0
Hi all
Running AX 2012 R3 CU9.

Having a bit of a problem with a computed column in a view. I'm trying to limit the data to purely data after X days ago (in this case 90 days). The obvious way I thought to do it, it doesn't seem to filter anything at all:
return strFmt("SELECT COUNT(%1) FROM %2 WHERE %3 = %4 AND %5 > %6 AND DATAAREAID = 'ABC'",
        fieldStr(ABC_Usage_RawData, Qty),
        tableStr(ABC_Usage_RawData),
        fieldStr(ABC_Usage_RawData, ItemId),
        SysComputedColumn::returnField(tableStr(ABC_Usage_FinalFigures), tableStr(InventTable), fieldStr(InventTable, ItemId)),
        fieldStr(ABC_Usage_RawData, DatePhysical),
        systemDateGet()-365
        );
In this example, Usage_FinalFigures is my view, and Usage_RawData is a view which has all the transactions I need. But it won't filter by date at all, it just gives the same answer regardless.
Am I doing something wrong?
Thanks very much in advance for your help
Cheers
Luke

Viewing all articles
Browse latest Browse all 17532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>