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 6778 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I have a FMP6 data base with a date field.

I want to define a new field (called Term) where the data is a calculation based on the date field:

ie if the data is within a range of dates eg between 30/1/06 and 30/4/06 (Aust format) then a number eg 1 goes in the Term field.

I can't work out how to write the If statement...

help please

Posted

Strictly speaking you don;t need an If statement... this expression will resolve to either 1 or 0. You only need an If to replace the 0 with null if that's what you prefer.

Term >= Date( 1, 30, 2006 ) and Term <= Date( 4, 30, 2006 )

Posted

Hi Vaughan

Actually, I wanted to define the Term field for school terms ie Term 1, Term 2, Term 3 Term 4...I'm not sure if your response will work!

Posted

So far the calculation is

(Term=)

_______

If(ASdate>=30/01/2006

and

ASdate<=30/04/2006,

1,

"")

_______

My problem is in defining the range

Once fixed I will replace ""

with another calculation for dates for Term 2

etc

I know its simple but I can't work it out!!

Posted

To clarify

I have an FMP6 related file with fields relating to student names, and detention dates (ASdate).

I have some layouts that summarise the data according to the school term.

I manually input the date of detention but I wanted to set up a calculation that would automatically insert the appropriate school term in another field based on a range of dates already inputted in the detention date field.

The calculation field is organised as previous posts but when I try to calculate within a range of dates I can't get a result.

Is this more complicated than I think it is?

Cheers

Posted

You are going to have to describe the start and end of your terms

I have used four fields, plus your Date Field and the calculation.

[color:blue]ASdate

Term1_Start

Term1_End

Term2_Start

Term2_End

All Date fields

TermCalc (Calculation, Number) =

Case( ASdate ≥ Term1_Start and ASdate ≤ Term1_End, 1,

Case( ASdate ≥ Term2_Start and ASdate ≤ Term2_End, 2 ))

You will need to modify this for additional Terms.

HTH

Lee

This topic is 6778 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.