web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Suggested Answer

Advance filter on dates - (LessThanUtcNow()) but not blank

(6) ShareShare
ReportReport
Posted on by 85
Hello,
 
I am trying to apply an advance filter on confirmed receipt date for open purchase orders.
 
I want to apply both (LessThanUtcNow()) and is not blank. Otherwise, the (LessThanUtcNow()) filter alone will display blank values, which I do not want.
 
I have tried a few without success:
  • >01011900
  • !""
 
 
Any ideas?
 
Thank you in advance!
I have the same question (0)
  • Adis Profile Picture
    6,069 Super User 2025 Season 2 on at
    Hi,
     
    Right from the gut I would try to apply the BETWEEN syntax => 01.01.1900..(LessThanUtcNow())
     
    I would also check:
    -if the two values work separately, ie. filter by no blanks OR (LessThanUtcNow()). Instead of using !"" or >01011900, try using a date before the first purchase order ever created in the system.
    -Instead of (LessThanUtcNow()), try using a date. Maybe the function works as a stand alone function but not in combination.
     
    Kind regards, Adis
     

    If this helped, please mark it as "Verified" for others facing the same issue

  • Laurens vd Tang Profile Picture
    4,018 Super User 2025 Season 2 on at
    Good day,
     
    Could you try it with (LessThanUtcNow()) , !"" 
     
    Best regards,
    Laurens van der Tang
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,447 Super User 2025 Season 2 on at
     
    You need to use >T instead of (LessThanUtcNow()) because it also contains null values 
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    Can you tell me what is the data that you want to filter? for example, do you want to return records that have confirm receipt date > 1/1/1900? 
     
     
    Thanks,
    Waed Ayyad
     
  • jwell22 Profile Picture
    85 on at
    Thanks all for your responses so far, but unfortunately none of the suggestions work.
     
    I'm still getting blank values come through.
     
    The data I'm trying to filter is on lines where the confirmed receipt date is:
    • A date in the past (not including today)
    • Not blank
  • Waed Ayyad Profile Picture
    9,039 Super User 2025 Season 2 on at
    Hi,
     
    To be clear do you want to get all records < today () and not blank?
     
     
    Thanks,
    Waed Ayyad
     
     
  • jwell22 Profile Picture
    85 on at
    That's right. So I want to see POs which are late.
  • Martin Dráb Profile Picture
    237,987 Most Valuable Professional on at
    The problem with yours, lvdtang's and Mohamed's approaches is that they're combining the ranges with OR operator, not AND.
     
    A good approach may be creating a custom query range util method, similar to lessThanUtcNow(), but excluding empty values.
  • Suggested answer
    Mohamed Amine Mahmoudi Profile Picture
    26,447 Super User 2025 Season 2 on at
     
    the first solution works very well for me.

    if not, I suggest this solution: put 1901 instead of 1900.
     
     
    Best regards,
    Mohamed Amine MAHMOUDI
  • jwell22 Profile Picture
    85 on at
    This one is almost perfect, except I don't want to filter on today's date (T), instead I want yesterday.
    • The idea being that I capture POs that are "late"
    I have tried (Day(-1)) but this does not work either.
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 307 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 123 Super User 2025 Season 2

#3
Gerardo Rentería García Profile Picture

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

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans