![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
|
I am trying to get a calculation field to work by adding so many years from a date and another calculation field. I'm using FMP 5.5 on a Windows XP machine. More details are below. The first field is a text for what the equipment is in a pop up list and the 2nd field is calculation using the case function. This way if I select "red" in the pop up list, the calculation will display a 5 but if I choose "green" then a 10 will be shown. This is for the number of years in the future when the next maintence is due. The 3rd field is a date field that I have modified in the custom display to show only the month and year. The 4th and final field (the reason for this question) is the one I having a problem with now. I currently have it as a calculation field that is supposed to take the 2nd field (which should be a 5 or a 10) and then add it to 3rd field for the number of years and telling it that the result is a date. An example display of what I want is below. red 5 1/2005 1/2010 red 5 3/2005 3/2010 green 10 6/1998 6/2008 The problem I'm having is that two-fold. One the dates for the 4th field are really wacky. Using the above example the 4th field displays 11/30/0011. The calcution I used was Date( Month("3rd field"), Day("3rd field"), Year("3rd field") + "2nd field") where the "xxx field" is replaced with the current fields name and telling the calculation field the result is a date. I was trying to simplify for the example, but I may have have confused things all the more with my example. Sorry. The 2nd problem would be to have the the calculation display the answer in the same format as the 3rd field. If it will help I can send a copy of the file (with most of the records deleted due to size, but everything else intact) through email. |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
snip Hmmmm, if it worked for you then I will just create a new database and try it from scratch. I may have something left over or forgotten something in the file. I'll report more later. Thank you both. |
#7
| |||
| |||
|
|
I am trying to get a calculation field to work by adding so many years from a date and another calculation field. I'm using FMP 5.5 on a Windows XP machine. More details are below. The first field is a text for what the equipment is in a pop up list and the 2nd field is calculation using the case function. This way if I select "red" in the pop up list, the calculation will display a 5 but if I choose "green" then a 10 will be shown. This is for the number of years in the future when the next maintence is due. The 3rd field is a date field that I have modified in the custom display to show only the month and year. The 4th and final field (the reason for this question) is the one I having a problem with now. I currently have it as a calculation field that is supposed to take the 2nd field (which should be a 5 or a 10) and then add it to 3rd field for the number of years and telling it that the result is a date. An example display of what I want is below. red 5 1/2005 1/2010 red 5 3/2005 3/2010 green 10 6/1998 6/2008 The problem I'm having is that two-fold. One the dates for the 4th field are really wacky. Using the above example the 4th field displays 11/30/0011. The calcution I used was Date( Month("3rd field"), Day("3rd field"), Year("3rd field") + "2nd field") where the "xxx field" is replaced with the current fields name and telling the calculation field the result is a date. I was trying to simplify for the example, but I may have have confused things all the more with my example. Sorry. The 2nd problem would be to have the the calculation display the answer in the same format as the 3rd field. If it will help I can send a copy of the file (with most of the records deleted due to size, but everything else intact) through email. |
![]() |
| Thread Tools | |
| Display Modes | |
| |