Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6059 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hello. I have 3 fields. "Start Date", "End Date" and "Plan".

The "Plan" has 3 options "1 month", "3 months" and "1 year".

I want that if the "Plan" is "1 month" that the "End Date" be the "Start Date" plus 1 month, and the same with the other options. How can i do it? Thanks

Posted (edited)

Change the field "End Date" to a calculation field, using the following calculation:

Start Date + Case( Plan = "1 month"; 30; Plan = 3 months"; 90; Plan = "1 year"; 365)

Then change the storage options so that it "Recalculates when needed." And set the result type to Date.

Also, make sure your Start Date field is a Date field.

Edited by Guest
Posted

If you want to be a bit more precise:

Let( months = Case( Plan = "1 year" ; 12; GetAsNumber( Plan ) ) ; 

    Date( Month(Start Date) + months ; Day(Start Date) ; Year(Start Date) )

    )

Also, End Date could be a calculated field, but an auto-enter field could work as well.

This topic is 6059 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.