Newbies claudiunemes Posted November 30, 2008 Newbies Share Posted November 30, 2008 hello there, I'll appreciate any help on this matter. I have one repeating field with 4 values called "english". english[1], english[2], english[3], english[4]. I have anoter calculated repeating field with 3 values called "diffForEnglish" in which I want to have the following calculated results: diffForEnglish[1]=english[2]-english[1]; diffForEnglish[2]=english[3]-english[2]; diffForEnglish[3]=english[4]-english[3] Could anyone tell me how to do this? Many thanks for your time, Yours, Claudiu Link to comment Share on other sites More sharing options...
comment Posted November 30, 2008 Share Posted November 30, 2008 Try: english[Get ( CalculationRepetitionNumber ) + 1] - english Link to comment Share on other sites More sharing options...
Newbies claudiunemes Posted November 30, 2008 Author Newbies Share Posted November 30, 2008 (edited) Hello there, Many thanks for your reply. The code works just fine. Thanks again, Yours, Claudiu I have another problem now, hope this will be the last one. i have same "english" field with 8 repeating values: english[1], to english[8] and now I want to do an average in the "averageEnglish" field with 4 repeating values as follows: averageEnglish[1] = Average(english[1];english[2]); averageEnglish[2] = Average(english[3];english[4]); averageEnglish[3] = Average(english[5];english[6]); averageEnglish[4] = Average(english[7];english[8]); Again many thank's for you time, Yours, Claudiu Edited November 30, 2008 by Guest Link to comment Share on other sites More sharing options...
Lee Smith Posted November 30, 2008 Share Posted November 30, 2008 Why are you using Repeating Fields? Generally speaking, the Repeating Fields were made useless for most things when FileMaker created Relationships. Perhaps there is a better way to accomplish what you are trying to do, so why not explain what it is that you are trying to accomplish with these Fields? Lee Link to comment Share on other sites More sharing options...
Newbies claudiunemes Posted November 30, 2008 Author Newbies Share Posted November 30, 2008 (edited) Hi Lee, I work for a scholar situation that have a lot of disciplines "followed" over 8 semesters (4 years of studies). So for semestrial average i'll have to produce one semesterAverage field with 8 repeating values instead of making 8 separate semesterAverage fields. In my opinion repeating fields saves time. There are 15 disciplines x 8 semesters, 2 averages x 8 semesters and 2 averages for 4 years. Also differences for each discipline sem2-sem1, sem3-sem2 ... etc. so only here i save arround 150 calculation fields. Yours, Claudiu I put (for the previous post) Average( english[Get ( CalculationRepetitionNumber )] ; english[Get ( CalculationRepetitionNumber ) + 1] ) but like this it don't returns in "averageEnglish" the average of [1]sem1-2; [2]sem3-4; [3]sem 5-6 and [4]sem 7-8 Edited November 30, 2008 by Guest complete the last post Link to comment Share on other sites More sharing options...
Newbies claudiunemes Posted November 30, 2008 Author Newbies Share Posted November 30, 2008 (edited) Hello there, It seems that this piece of code solve the average problem. hope this is correct: Average ( english[Get ( CalculationRepetitionNumber ) + 1] ; english[Get ( CalculationRepetitionNumber ) + 2] ) Many thanks to you all, P.S. I'll apreaciate a notification is this code is not the right one. Edited November 30, 2008 by Guest Link to comment Share on other sites More sharing options...
comment Posted November 30, 2008 Share Posted November 30, 2008 This doesn't seem like a good arrangement to have. I believe things could be a lot easier if you put all these grades(?) into a related table, each one in a separate record. Link to comment Share on other sites More sharing options...
Recommended Posts
This topic is 5764 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 accountSign in
Already have an account? Sign in here.
Sign In Now