Query

rated by 0 users
Answered (Verified) This post has 1 verified answer | 2 Replies | 2 Followers

Top 500 Contributor
9 Posts
Points 27
GFK posted on Mon, Dec 19 2016 3:38 AM | 198.36.39.181

hi,

is there anyway that we could add a CAML query to trigger emails based on the below:

-an email to be sent after the due date by one day.

 

Answered (Verified) Verified Answer

Top 10 Contributor
1,824 Posts
Points 27,650
Answered (Verified) Julie Auletta replied on Mon, Dec 19 2016 9:17 AM | 10.10.8.62
Verified by GFK

If you want the reminder email sent just one time for a task that was due THE DAY BEFORE YESTERDAY, the CAML would be:


<Query><Where>
<And>
<Neq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Neq>
<Eq><FieldRef Name="DueDate" /><Value Type="DateTime"><Today /><addValue value="-2" /></Value></Eq>
</And>
</Where></Query>

If you want the reminder email sent first when the task is overdue by one day (i.e., due the day before yesterday) and another email sent each day after when the task is STILL not complete, you would check the Follow-up Wait Days and set it to 1 and set the CAML to:


<Query><Where>
<And>
<Neq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Neq>
<Leq><FieldRef Name="DueDate" /><Value Type="DateTime"><Today /><addValue value="-1" /></Value></Leq>
</And>
</Where></Query>

Julie Auletta

    

All Replies

Top 500 Contributor
9 Posts
Points 27
GFK replied on Mon, Dec 19 2016 3:39 AM | 198.36.39.181

sorry,

if the task is not completed and the task is over due by 1 day only an email should be triggered.

Top 10 Contributor
1,824 Posts
Points 27,650
Answered (Verified) Julie Auletta replied on Mon, Dec 19 2016 9:17 AM | 10.10.8.62
Verified by GFK

If you want the reminder email sent just one time for a task that was due THE DAY BEFORE YESTERDAY, the CAML would be:


<Query><Where>
<And>
<Neq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Neq>
<Eq><FieldRef Name="DueDate" /><Value Type="DateTime"><Today /><addValue value="-2" /></Value></Eq>
</And>
</Where></Query>

If you want the reminder email sent first when the task is overdue by one day (i.e., due the day before yesterday) and another email sent each day after when the task is STILL not complete, you would check the Follow-up Wait Days and set it to 1 and set the CAML to:


<Query><Where>
<And>
<Neq><FieldRef Name="Status" /><Value Type="Choice">Completed</Value></Neq>
<Leq><FieldRef Name="DueDate" /><Value Type="DateTime"><Today /><addValue value="-1" /></Value></Leq>
</And>
</Where></Query>

Julie Auletta

    

Page 1 of 1 (3 items) | RSS
Bamboo Solutions Corporation, 2002-2016