LuckyMe Posted February 2, 2005 Share Posted February 2, 2005 Hi, I am using FMP Developer 7 on Windows XP. I am trying to define a calculation field called “Best Time†to mark down or display the best time result from swimming meets For example Stroke Description Time Date Best Time 50 yards Freestyle 20:12 1/1/05 Yes 50 yards Freestyle 22:12 2/1/05 No 25 yards backstroke 30:45 1/1/05 No 25 yards backstroke 27:45 2/1/05 Yes Yes means best time. Stroke Description, Time, and Date are entry data Best Time is calculation field I want to define. Any advice? Thanks Link to comment Share on other sites More sharing options...
bikergeek Posted February 2, 2005 Share Posted February 2, 2005 Depending on how you have the layout set up, with repeating fields or separate records, you have some options. I'd think the best way would be separate records, viewed in list format, sortable by any of the included fields. Then you'd have a summary field defined as the minimum value of field Time for a subset of all records, such as those which match Description fields. That can be done by defining a self-relationship based on the Description field. You'd set up a matching relationship and summary field for each event so that the summary field only looks at the records for that event. The Best Time field would be a calc: if (Time = TimeSummary;"Yes";"No") Link to comment Share on other sites More sharing options...
LuckyMe Posted February 2, 2005 Author Share Posted February 2, 2005 Thank you for your reply. Yes we could set up self relationship, but instead of using summary field as you mentioned I use the dropdown list based on Stroke ID, and the dropdown list is always shows the smallest number in the top of the list. All we need is to use one of the GetFunction script to capture the top item from the value list. I am not sure what is GetFunction script that I am going to use but it should be a matter of searching it. What do you think? Thanks Link to comment Share on other sites More sharing options...
-Queue- Posted February 3, 2005 Share Posted February 3, 2005 Substitute( LeftValues( ValueListItems( Get(FileName); "yourValueList" ); 1 ); ¶; "" ) Link to comment Share on other sites More sharing options...
LuckyMe Posted February 3, 2005 Author Share Posted February 3, 2005 I used: LeftWords ( ValueListItems ( Get FileName ); "ShowBestResult") ; 1) and it wordk too Thanks guys Link to comment Share on other sites More sharing options...
-Queue- Posted February 3, 2005 Share Posted February 3, 2005 Yes, as long as you are only after one word, LeftWords will work fine also. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.