January 19, 20232 yr Hello all. I have an attendance table that holds a few calculation fields based on on a stipend program for firefighters. For each attendance record it calculates the stipend payout for that particular record. Then I have a summary field in the attendance table that gathers all the records and adds them for each firefighter on a new layout. There is one piece I can't figure out how to make work. If the firefighter is an "Officer" they are given a set value (from a personnel record table) added to the stipend. I cannot get a calculation to work adding those two values together. Here is what i have been trying to manipulate to make it work. I'm guessing i'm doing things totally wrong. I just get a "0" GetSummary ( TotalIndividualStipenedCreditPayout ; kf_personnel ) + StipendPayoutforOfficers Any ideas how I can accomplish this? Do I need to create a field in the personnel record to temporarily store the stipend payout summary as a non summary number field? Then I guess I would use a looping script to get that value set and then create a calculation field in the personnel record to add the two together now that it's not a summary anymore? Thanks Chris
January 19, 20232 yr It's not clear what is your final goal. If you want to summarize the Attendance table using a report layout of the Attendance table, then you need to add the related amount from the personnel record to the subtotal - something like: GetSummary ( TotalIndividualStipenedCreditPayout ; kf_personnel ) + Personnel::StipendPayoutforOfficers OTOH, if you want to view this using a layout of the Personnel table, then you cannot use the summary field - you need to sum the related amounts using the Sum() function and add the additional amount from the local field.
January 19, 20232 yr Author Thank you Comment. Sorry I forgot to include that info. Yes. the layout that this will be viewed on is using the Attendance Table. I'll what you described above and see what happens. I thought I did that already but I tried so many things that I might have not done that. Thanks Chris Hi. i just checked and I was wrong in my first description of how it is structured. GetSummary ( TotalIndividualStipenedCreditPayout ; kf_personnel ) + StipendPayoutforOfficers TotalIndividualStipendCreditPayout - That is a summary field in the attendance table. StipendPayoutforOfficers - That is a calculation field in the attendance table. The calculation is this: Personnel Records::StipendOfficerCredits * PerCreditCalc (PerCreditCalc lives in the attendance table) PerCreditCalc is a variable number depending on a set budget devided by the total number of credits earned by the membership. (That part works fine). Given these new details, I am still trying to add the "Summary" of TotalIndividualStipenedCreditPayout to the StipendPayoutforOfficers I hope this is enough info to try and help diagnose. Thanks! Chris Edited January 19, 20232 yr by CKonash
January 22, 20232 yr I would approach this differently. I would create stipend and stipend lines is a scripted process. Perhaps mark attendance records to be added (approved?) for a stipend. If the user is an officer, an additional stipend line is created. Once added to a stipend, the attendance record is no longer available to be marked. I’d set the stipendId in the attendance line. the benefit is that you now have a stipend record. Where you can track status, date paid, print a statement, etc.
Create an account or sign in to comment