Help

Re: Automatic duration calculator

Solved
Jump to Solution
699 0
cancel
Showing results for 
Search instead for 
Did you mean: 
KoBla
4 - Data Explorer
4 - Data Explorer

I want to have a select field with a couple of options for clients that need a subscription. Like: "1 month subscription", "2 month subscription", ... . This would ideally convert the answer into a 31 day duration field that can then be used in a date dependency to calculate the end date for the subscription. Is this possible?


I already figured out that i can convert it to duration using a formula field but then i can't use it in a date dependency...

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Does this look right?

Screenshot 2024-05-03 at 11.11.50 AM.png

DATEADD(
  {Start Date},
  SWITCH(
    Subscription,
    '1 month subscription', 31,
    '2 month subscription', 62
  ),
  'days'
)

See Solution in Thread

3 Replies 3
Kyrstin_Graves
7 - App Architect
7 - App Architect

I'm not sure I'm fully understanding what you're asking. Can you show an example of an expected output?
So far I'm assuming you'd need an automation, but I want to make sure I provide the easiest and best solution for you.

TheTimeSavingCo
18 - Pluto
18 - Pluto

Does this look right?

Screenshot 2024-05-03 at 11.11.50 AM.png

DATEADD(
  {Start Date},
  SWITCH(
    Subscription,
    '1 month subscription', 31,
    '2 month subscription', 62
  ),
  'days'
)

This is exactly what i needed! Don't understand how i didn't think of just not using the date dependency and just using a formula instead...

Thank you very much!