Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Flow Field On Table With Date Filter

(0) ShareShare
ReportReport
Posted on by 2,841

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
    2,841 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
    89 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
    2,841 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
    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
    89 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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
YUN ZHU Profile Picture

YUN ZHU 311 Super User 2025 Season 1

#2
Mansi Soni Profile Picture

Mansi Soni 242

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 201 Most Valuable Professional

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans