Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help on writing conditional statements 1

Status
Not open for further replies.

saraswati

IS-IT--Management
Dec 22, 2002
2
US
Hi ! I have just joined this forum. I am using FileMaker Pro 6 under Windows XP platform. Could anyone please help me in accomplishing the following task.
I have 5 fields each with values YES & NO
1. UM Fee Waiver
2. FS Scholarship
3. Fin Aid Student
4. DANTES
5. VA
I have another field called Enrollment Date which is a date field.
I have to define a new field called FA Semester. The value of the FA Semester field is based on the following conditions.
If (UM Fee Waiver = "YES" or FS Scholarship = "YES" or FinAidStudent = "YES" or DANTES = "YES" or VA = "YES" ) {
if (Enrollment Date is between Sept 21 through Feb 20)
FA Semester = SPRING
else if (Enrollment Date is between Feb 21 through May 10)
FA Semester = SUMMER
else if (Enrollment Date is between May 11 through Sept 20)
FA Semester = FALL
}
I am new to FileMaker Pro and I would appreciate if anyone could help me.
 
This should work for you. I used a case statement instead of if. I think it's much easier to use and I've heard that it's faster to run then if. This formula assumes you have
a field defined as "Enrollement Date".

Case(UM Fee Waiver = "YES" or FS Scholarship = "YES" or FinAidStudent = "YES" or DANTES = "YES" or VA = "YES" ) {

Case(Enrollment Date >= Date( Month( 9 , 21 , 2002 ) or Enrollment Date <= Date( Month( 2 , 20 , 2003 ),
FA Semester = &quot;SPRING&quot;,

Enrollment Date >= Date( Month( 2 , 21 , 2002 ) or Enrollment Date <= Date( Month( 5 , 10 , 2003 ),
FA Semester = &quot;SUMMER&quot;,

Enrollment Date >= Date( Month( 5 , 11 , 2002 ) or Enrollment Date <= Date( Month( 9 , 20 , 2002 ),
FA Semester = &quot;FALL&quot;)
)

Spring, Fall and Summer must have &quot; &quot; around them because they are text answers to the case statement.

I hope this works for you.

Marty
 
Thank you very much Marty u made the code look so simple and clear. I really appreciate your effort.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top