AnsweredAssumed Answered

Calculation fields with repetitions

Question asked by planteg on Mar 30, 2015
Latest reply on Mar 31, 2015 by planteg

Hello everyone,


I am wondering if it's possible to have different calculations for different repetition of a field  ? Maybe that can't be done, but here is how I came to think about this.


For the purpose of creating a report, I will use a table with calculation fields, some kind of virtual table. For you to make an image, think about a pay slip where you display numbers for a specific pay as well as totals for up to that pay. Then you should display two amounts per category. To get these numbers, I will have Data_1 and Data_2 which will be filled by two ExecuteSQL() calls. Then field_1 will be GetValue ( Data_1; 1), field_2 will be GetValue ( Data_1; 2), etc.


I could double the number of fields_n, but instead I thought of having two repetitions: repetition 1 for this pay, and repetition 2 for up to this pay. This is where I run into  the wall: how can I set a different calculation for each of the repetition, for example:


field_1[1] = GetValue( Data_1; 1)

field_1[2] = GetValue( Data_2; 1)


I am looking for a way to do it as calculation fields, but maybe I can achieve this only trough a script - it's worth asking .




Gilles Plante