How can I identify the first and last row in a repeatable subform? I’m using instanceManager and managed to calculate the total number of rows using FormCalc, however, I don’t know how to identify the first and last row.
This is what I need to do:
The repeatable subform contains a checkbox. If this checkbox is checked in the first and/or last row (of the repeatable subform), then I need a calculation to be performed, otherwise, this calculation should not occur.
hello there! thank you so much!!!! However, I’m trying to apply this same code to a second object that is performing an additional calculation and I’m having A LOT of trouble and would LOVE your help or anyone else's help.
My calculations are dependent on: 1. If a checkbox is checked 2. The number of days entered 3. The number of rows that are added
Basically, if the first row is the ONLY row, then it can contain three possible calculations
if a checkbox is checked and the total number of days entered is <= 2, then the calculation is.... partial.rawValue * Days.rawValue
if a checkbox is checked and the total number of days entered is > 2, then the calculation is....perDiem.rawValue* (Days.rawValue- 2 ) + (partial.rawValue* 2)
otherwise, the calcuation is....perDiem.rawValue * Days.rawValue
However, if more than one row is selected, then the first and the last row would contain the following possible calculations:
If a checkbox is checked, then the calculation is…perDiem.rawValue* (Days.rawValue- 1 ) + partial.rawValue
Otherwise, the calculation is…perDiem.rawValue * Days.rawValue
The middle rows are always going to contain one possible calculation of…perDiem.rawValue * Days.rawValue