Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Answered

Flowfield for last six months

Posted on by Microsoft Employee

Hi,

I'm trying to put together a flowfield that will calculate whether a customer has purchased in the last 6 months.

I have tried many variations of the below CalcFormula below but keep getting "CALCDATE... is not a valid date"

Exist("Cust. Ledger Entry" WHERE (Posting Date=FILTER(> CALCDATE(<-6M>) ),Document Type=FILTER(Invoice),Customer No.=FIELD(No.) ) )

Another one I'd like to do is this for the previous financial year:

Posting Date=FILTER(-CY-1Y..CY-1Y)
  • Suggested answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Flowfield for last six months

    Yes, during the opening of the page you will set the flowfilter which will indeed calculate your flowfield.

  • KTA Profile Picture
    KTA 1,200 on at
    RE: Flowfield for last six months

    In the button or the action do you want to perform that filter

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Flowfield for last six months

    Thanks Suresh. It does look like a FlowFilter is the way to go.

    I would like the filter set by default though, and I notice on our system (not sure if it is a standard thing) on the Customer List the page loads with "Limit totals to: Where Date Filter is 01/01/18..31/12/18". Do you know where this gets done? Is it C/AL code on the page? Unfortunately I'm not a developer so can't see the code.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Flowfield for last six months

    Thanks KTA.

    Where would I put that code?

  • Verified answer
    Suresh Kulla Profile Picture
    Suresh Kulla 43,640 on at
    RE: Flowfield for last six months

    You need to do that using a flow filter and then apply your 6M filter to the FlowFilter to Calculate it.  Check for example Inventory field on Item, it uses various flow filters.

  • KTA Profile Picture
    KTA 1,200 on at
    RE: Flowfield for last six months

    EndDate:=TODAY;

    InitDate:=CALCDATE('<-6M>',EndDate);

    SETRANGE("Posting Date",InitDate,EndDate);

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,570 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,683 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans