Date Calculation in Process Definition or Business Rule

I'm trying to compare two date fields in a single record, then perform a process if the difference between those dates is greater than 30 days.

So the criteria for the action is IF Date1-Date2 > 30 days

I see how to compare a date to a specific date, but not how to compare to another date field.

Parents
  • We faced challenge like that in the past.

    The solution was to create an integer field and setup a sugarLogic formula which calculate the difference between those two date fields. Then you evaluate this custom integer field in the Process.

    Not big deal!

    Regards

    André Lopes
    Lampada Global
    Skype: andre.lampada
  • A formular can look like this:

    subtract(daysUntil($enddate_c),daysUntil($startdate_c))

    The issue you will face is that this field only calculates when the record changes so if nothing happens to the target record the advanced process will not trigger and you will miss most of the events.

    You need to find a way to update your target records repeadingly with something like a scheduler.

    Edit: No issue with updating the calculation. You only need to recalculate the values for existing records once you have created a field with such a formula.

    Bests

    Björn

Reply
  • A formular can look like this:

    subtract(daysUntil($enddate_c),daysUntil($startdate_c))

    The issue you will face is that this field only calculates when the record changes so if nothing happens to the target record the advanced process will not trigger and you will miss most of the events.

    You need to find a way to update your target records repeadingly with something like a scheduler.

    Edit: No issue with updating the calculation. You only need to recalculate the values for existing records once you have created a field with such a formula.

    Bests

    Björn

Children
No Data