csbalogh Posted May 8, 2004 Posted May 8, 2004 Is it possible to define separate calculation formulas for a repeating calculation field? e.g. a+b for rep. 1; a-b for rep 2; a*b for rep. 3 etc. (I do not envisage using any scripts like SetField.) csb ps. If this is not possible what is the usefulness of a repeating calculation field?
-Queue- Posted May 8, 2004 Posted May 8, 2004 Yes, it's not too difficult. You'll need another repeating field (call it repNum) with as many repetitions as you need calculations. This can be a global if you don't need to store the results. The first repetiton will contain the number 1, the second 2, and so forth. Then your calculation will be Choose( repNum - 1, a + b, a - b, a * b, ... ). Or you could have repNum as 0, 1, 2, etc. and use Choose( repNum, a + b, a - b, a * b, ... ) The best use for repeating calcs is in calculations that increment or decrement. Instead of making a long hardcoded calc such as Left( field, 1 ) & "
-Queue- Posted June 10, 2004 Posted June 10, 2004 Get(CalculationRepetitionNumber) only works for version 7. The repnum field is necessary for earlier versions. For 7 you can use Get(CalculationRepetitionNumber) - 1 for the test portion of Choose and eliminate the need for the zero result of "", similar to the repnum - 1 test shown above.
Recommended Posts
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