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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

How can I resolve the error stating: The date-time format for @activities('Set variable1').value is invalid, or value is outside the supported range.

(0) ShareShare
ReportReport
Posted on by 5

I want to filter the source records to pick up only the reords since Maximum Last modified Datetime in SQL. I am using a lookup block to Pick up the maximum date from SQl and stoe it a variable, but while I pass it in source in the form of Fetch XML I receive the error.
My Filter block in FetchXML is as follows:

<condition attribute="modifiedon" operator="on-or-after" value="@activities('Set variable1').value"/>

Is there some other way in which I should pass this in fetch XML or some other Work Around.

My ADf pieline is as follows:

pastedimage1582267504219v1.png

I have the same question (0)
  • Rushank Profile Picture
    5 on at

    Please help if any solution.

  • v-ancos Profile Picture
    Microsoft Employee on at

    Dear Rushank ,

    We need to understand where this filter is used.

    Can you please give us more details?

    Regards,

  • Suggested answer
    v-ancos Profile Picture
    Microsoft Employee on at

    Dear Rushank ,

    You need to use a Link Entity.

    You can see below an example between account and contact.

    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
      <entity name="account">
        <attribute name="name" />
        <attribute name="primarycontactid" />
        <attribute name="telephone1" />
        <attribute name="accountid" />
        <order attribute="name" descending="false" />
        <link-entity name="contact" from="parentcustomerid" to="accountid" link-type="inner" alias="ab">
          <filter type="and">
            <condition attribute="modifiedon" operator="last-month" />
          </filter>
        </link-entity>
      </entity>
    </fetch>
    Regards
  • Rushank Profile Picture
    5 on at

    Hi Ana,

    I don't think I require a Link Entity because I am straightforward using the Modifiedon date from Quote Entity. Now Instead on using a variable I am trying to output of Lookup block directly. My Fetch XML with the condition is as follows:

    <fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">

    <entity name="quote">

    <attribute name="msdyn_estimatedschedule"/>

    <attribute name="name"/>

    <attribute name="statecode"/>

    <attribute name="totalamount"/>

    <attribute name="quoteid"/>

    <attribute name="createdon"/>

    <order descending="false" attribute="msdyn_ordertype"/>

    <attribute name="totallineitemamount"/>

    <attribute name="msdyn_grossmargin"/>

    <attribute name="totalamount_base"/>

    <attribute name="totalamountlessfreight"/>

    <attribute name="totallineitemdiscountamount"/>

    <attribute name="totalamountlessfreight_base"/>

    <attribute name="totaldiscountamount"/>

    <attribute name="totallineitemamount_base"/>

    <attribute name="msdyn_estimatedbudget"/>

    <attribute name="quotenumber"/>

    <attribute name="modifiedon"/>

    <filter type="and">

    <condition attribute="modifiedon"   operator="on-or-after"  value="@activity('Lookup1').output.firstRow.maxDate"/>

    </filter>

    </entity>

    </fetch>

    I am still receiving the same Error.

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!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 103 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 83

#3
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 69 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans