Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Answered

Flow Field On Table With Date Filter

(0) ShareShare
ReportReport
Posted on by 2,490

Hi Guys

I want to insert a flowfield to sales line table that only shows quantity on reservations but only if the reservation come from purchase order rather than stock (item ledger). Looking at the reservation entry table only difference could think of using is when reserved from purchase order it enters shipment or requested date field. Now I have flow field on sales line with below code:

            CalcFormula = - Sum("Reservation Entry".Quantity WHERE("Source ID" = FIELD("Document No."),
                                                                   "Source Ref. No." = FIELD("Line No."),
                                                                   "Source Type" = CONST(37),
                                                                   "Source Subtype" = FIELD("Document Type"),
                                                                   "Reservation Status" = CONST(Reservation),
                                                                    "Shipment Date" = filter(>20200102D)));
Problem is last line filter gives and error , tried OD  and <>'' etc but do not know how to enter a date or check null values.  Maybe there is a better solution to the original problem of calculating quantity only reserved through purchase orders?
thanks
  • Verified answer
    Samantha73 Profile Picture
    Samantha73 2,490 on at
    RE: Flow Field On Table With Date Filter

    thanks Yes that's what I did and worked and my mistake to take the shipdate for some reason after looking at the table before:) ..looks like you cannot filter directly with a date on flowfield so I created new field  "Date Filter" fieldclass type flowfilter and used it OnOpenPage...

    Lot of work to get something I thought pretty simple :)..But I'll see if there is a simple solution

  • Suggested answer
    JAngle Profile Picture
    JAngle 46 on at
    RE: Flow Field On Table With Date Filter

    39 lines have an expected receipt date whilst 32 lines do not. Can that not be your extra filter?

  • Samantha73 Profile Picture
    Samantha73 2,490 on at
    RE: Flow Field On Table With Date Filter

    Thanks Josh but I tried to use Source Type and there is no link to Sales Order directly as source ID does not contain SO number for linking when the line type = 39 below: Line 2 is from Item Ledger and Line 4 is PO but these lines do not have Source ID (SO). If you look at the Sales line BC table, base application only takes line 1 and 3 for the reservation as it shows all entries in that flowfield

    reservation-entry.jpg

  • Verified answer
    Rishikesh Tiwari Profile Picture
    Rishikesh Tiwari 130 on at
    RE: Flow Field On Table With Date Filter

    Create a new field Shipment Date Filter with Field Class FlowFilter and use that

  • Suggested answer
    JAngle Profile Picture
    JAngle 46 on at
    RE: Flow Field On Table With Date Filter

    You may have noticed but laying out the basics for explanation. The table is made up of negative entries for demand and positive entries for supply. So your flowfield should only care about that type of line. Also the “Entry Type” value shows a join between the entries so that needs to be in your filter too. You will then be able to use a source type filter of 39. Date is only useful if you want to show what the expected receipt date is as the other filters are already good enough

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans