4 Replies Latest reply on Apr 18, 2013 6:49 AM by philmodjunk

# help with nested IF statement for FM12??

### Title

help with nested IF statement for FM12??

### Post

I need help to write the equivelant of a nested IF statement for FileMaker Pro 12.

here are my fields:

•           Active (yes or no drop down)
•
•           MSc Start Date (data enter date field)
•
•           PhD Start Date (data enter date field)
•
•           MSc End Date (calculation of MSc Start date + 2 years)
•
•           MSc Ext End date (data enter date field)
•
•           PhD End Date (calculation of PhD Start date + 4 years)
•
•           PhD Ext End date (data enter date field)

I want a report that shows only those students whose Active status = Yes

then i need it to show the students upcoming end date.... here's where it gets complicated.

some students have a start date in both the MSc Start Date and PhD Start Date fields.

So i need it to look in the PhD Start field, IF there is a date in there, then i need it to look in the PhD Ext End date field, IF there is a date in there, then it should show this date.

If the PhD Ext End date field is empty then it should use the PhD End Date calculation field.

IF there was no date in PhD Start Date field, then i should look in MSc Ext End date field, IF there is a date in there, it should show this date.

IF the MSc Ext End date field is empty then it should use the MSc End Date calculation field.

• ###### 1. Re: help with nested IF statement for FM12??

Look up Case in FileMaker help.

Case ( Not IsEmpty ( PhD Ext End date ) ; PhD Ext End ;
Not IsEmpty ( PhD End Date ) ; PhD End Date ;
Not IsEmpty ( Msc Ext End Date ) ; Msc Ext End Date ;
Not IsEmpty ( Msc End Date ) ; Msc End Date )

• ###### 2. Re: help with nested IF statement for FM12??

It's even possible that this function will do the trick:

Max ( PhD Ext End ; PhD End Date ; Msc Ext End Date ; Msc End Date )

• ###### 3. Re: help with nested IF statement for FM12??

ok the case not isempty didn't work, but the Max one did!  you rock thanks!

• ###### 4. Re: help with nested IF statement for FM12??

The case function should have worked. I'm concerned that it didn't.