Skip to main content

Notifications

Announcements

No record found.

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.

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

  • Rushank Profile Picture
    Rushank 5 on at
    RE: 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.

    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.

  • Suggested answer
    v-ancos Profile Picture
    v-ancos on at
    RE: 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.

    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
  • v-ancos Profile Picture
    v-ancos on at
    RE: 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.

    Dear Rushank ,

    We need to understand where this filter is used.

    Can you please give us more details?

    Regards,

  • Rushank Profile Picture
    Rushank 5 on at
    RE: 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.

    Please help if any solution.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans