Reputation: 477
I need fetchxml condition operator to retrieve all my appointments on today-11 days. I mean if I run my query today(12/04/2018) I want to retrieve my created records on 01/04/2018. If I run on 13/04/2018 - records created on 02/04/2018. Which operator can I use to get what I need?
<fetch distinct="false" mapping="logical" output-format="xml-platform" version="1.0">
<entity name="appointment">
<attribute name="subject"/>
<attribute name="statecode"/>
<attribute name="scheduledstart"/>
<attribute name="scheduledend"/>
<attribute name="createdby"/>
<attribute name="regardingobjectid"/>
<attribute name="activityid"/>
<attribute name="instancetypecode"/>
<order descending="false" attribute="subject"/>
<filter type="and">
<condition attribute="createdon" value="" operator=""/>
</filter>
</entity>
Upvotes: 0
Views: 2124
Reputation: 23310
There is no single operator, but you can easily combine two:
<filter type="and">
<condition attribute="createdon" operator="last-x-days" value="11" />
<condition attribute="createdon" operator="olderthan-x-days" value="10" />
</filter>
Upvotes: 3
Reputation: 22846
There is no straight operator for this. You have to use eq
operator & calculate the expression (-11) yourself if you are using this fetchxml query in SSRS report @date
:
<condition attribute="new_date" operator="eq" value="@date"></condition>
Or calculate in javascript/C# & pass it to paramDate
, if you are calling this in form script or server code:
'<condition attribute="new_date" operator="eq" value="' + paramDate + '"></condition>'
Upvotes: 1