# Unable to generate appropriate due date for next due calls

**URL:** <https://forum.dimagi.com/t/unable-to-generate-appropriate-due-date-for-next-due-calls/3264>\
**Category:** Users\
**Created:** [February 9, 2017, 7:51am UTC](https://forum.dimagi.com/t/unable-to-generate-appropriate-due-date-for-next-due-calls/3264 "2017-02-09T07:51:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Priyanka\_A](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/p/b487fb/32.png) [@Priyanka\_A](https://forum.dimagi.com/u/Priyanka_A)\
**Post date:** [February 9, 2017, 7:51am UTC](https://forum.dimagi.com/t/unable-to-generate-appropriate-due-date-for-next-due-calls/3264/1 "2017-02-09T07:51:04Z")

</div>

Dear Team,

WE have a query regarding generating dates for the next due call.We have an  
app which maintains the reports of the calls made to participants. There  
are two forms in this app. One is the registration form and another is the  
follow up form.In the follow up form, based on the type of call made, the  
next call due date is displayed.BUT to keep in mind that the date will also  
depend on the variable, "how did the call begin".If participant answered  
the call then next call date will be +15 days and if anyone else answered  
then +1 day.Our project requirement is that a "scheduled call" is to be  
made every 15 days. Hence if the participant answers the call and the type  
of call is a scheduled one, then the next call date to be displayed will be  
+15 days.BUt if it any other type of call than a scheduled one, then the  
next call due date should be displayed same as that of the scheduled  
call.That means apart from a scheduled call the "next call due date should  
not be hampered.Thus i meant that the " next call date" should only change  
with respect to "scheduled call" and not other type of call.(eg: if  
"selected call" = "alert call" then the "next call due date" should be  
displayed as "previously generated date based upon scheduled call and not  
based upon today's date.Currently the next call due date for any other type  
of call is also displayed as +15 days.

The calculate condition that is given in the logic is

if( call\_initiation\_outcome = "participant\_answered",date( date\_call\_done +  
15), date( date\_call\_done + 1))

So please suggest what change should i make to this.

Thanks & Regards,

_Dr.Priyanka_
