Any ideas how I can return the total of OwnersPolicy split 1 to split 5. I don’t want the dollar amount I want the total percent. So if split 1 is 10% and 2 is 20% and 3 is 18% and 4 and 5 are empty, I want it to return 48%........
I have the following code which gets the percentage entered into each owners policy split field, BUT how do I get the TOTAL?
First, a question. Are you going to validate that in each split field that the value after "% of" (the split basis) is set to "Final Premium to Split"? Otherwise the summation of percentages won't tell you the whole story. In the default order, the last four values are set to "% of Balance after 1st Split" so you just can't add the value and derive much meaningful information. You need to take into consideration this split basis field.
In your proposed example, the percent summation is 48%, but the amount of premium paid is approximately 45%.
If this is what you actually want to do, you'll have to manually get each split and sum them (.SplitCalculation.Split1.Percent + .SplitCalculation.Split2.Percent + .SplitCalculation.Split3.Percent + .SplitCalculation.Split4.Percent + .SplitCalculation.Split5.Percent).