How To Add Days Based On Another Date Field?

Hello, I'm trying to create a duration panel for a subscription related data fields.

There are three fields

  1. Subscription Duration (Dropdown Field)
  2. Subscription Start Date (Date Field)
  3. Subscription End Date (Date Field)

Wherein:

  • Subscription Duration has the following dropdown options:
    • 1 Month
    • 2 Months
    • 3 Months
    • etc

What I'm trying to setup:(Sample Scenario)

  • Subscription Start Date = June 15, 2021
    • IF Subscription Duration = 1 Month, 2 Months, etc
    • THEN add days to Subscription End Date

Expected Result:

Sample A

  • Subscription Duration: 1 Month
  • Subscription Start Date: June 15, 2021
  • Subscription End Date: July 15, 2021

Sample B

  • Subscription Duration: 3 Months
  • Subscription Start Date: June 15, 2021
  • Subscription End Date: September 15, 2021

Does anyone know the Sugar Logic Formula to do this?

Parents Reply
  • Hi Bud, I also tried re-reviewing our options for the setup, and we tried the Process Definition setup, and it also works!

    For reference for everyone who will come across the same issue.

    You can create a Change Field action and then configure for date field to be updated with the following formula:

    {{subscription_start_date}} + 1m*

    * 1m is a constant. You can create it via Constants > Timespan > Select from the available options.

Children