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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Condition in a Query

(0) ShareShare
ReportReport
Posted on by 40

Hi Experts

I am having issues trying to create a conditional inside a query.
I have a date column ("LastModifiedDate"), which is sometimes null, in the case it is null I want to get the following date “01/01/1900”
Could you please help me ?

query 70639802 "Sales. Inv. Line"
{
QueryType = Normal;

elements
{
    dataitem(SalesInvoiceLine; "Sales Invoice Line")
    {
        column(DocumentNo; "Document No.")
        {
        }
        column(LineNo; "Line No.")
        {
        }
        column(AmountIncludingVAT; "Amount Including VAT")
        {
        }
        column(LastModifiedDate; "LastModifiedDate")

             {
              }

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    150 on at

    If you use the query to present data some where like a report or page then you can do a replacement value. In the case of the query object itself there are no options, properties or triggers that would do as you need. This resource might be helpful: thinkaboutit.be/.../

  • DARRA Profile Picture
    40 on at

    Thanks for the response Josh!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,091 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,032 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 946 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans