Stan, or anyone else, if you have an approach to this one, it would be great. I'll try to explain concisely what I am trying to do. Please look at the attachment.
We have the 5 fields that are for this purpose a super field so to speak. The taxable value in this simple example can never be adjusted below 0.
The rows listed original are contained in a history file for illustration purposes, and the rows listed as amendment are in a file called current.
So basically, I would need to compare the taxable values in current if they are negative to the originals in this case to make sure than an adjustment is not being run through that would bring it below 0. We do not want to populate the history file with the current file data at this point. We just want to make this comparison to determine if there are any problems. If there are any problems, we would hope to adjust the current data before it gets appended into the history.
Notice there are three separates comparisons in the attachment. in the case of the top two lines, the balance of the two lines is positive, so that group is fine. In the second, its negative by a penny (doesn't matter by how much). In the third group, it appears to be just like the first group, with the exception being in column 3, which is exempt type. The amendment in the third group is bad, because even one of its field identifiers are different, and therefore it is negative by itself.
Post back with any questions if I did not explain it clearly. Otherwise, I hope this brings up some useful ways of handling such a situation. I tried to make the examples very basic. I hope the attachment is there. I can't tell at this point.
Thanks,
Bruce
We have the 5 fields that are for this purpose a super field so to speak. The taxable value in this simple example can never be adjusted below 0.
The rows listed original are contained in a history file for illustration purposes, and the rows listed as amendment are in a file called current.
So basically, I would need to compare the taxable values in current if they are negative to the originals in this case to make sure than an adjustment is not being run through that would bring it below 0. We do not want to populate the history file with the current file data at this point. We just want to make this comparison to determine if there are any problems. If there are any problems, we would hope to adjust the current data before it gets appended into the history.
Notice there are three separates comparisons in the attachment. in the case of the top two lines, the balance of the two lines is positive, so that group is fine. In the second, its negative by a penny (doesn't matter by how much). In the third group, it appears to be just like the first group, with the exception being in column 3, which is exempt type. The amendment in the third group is bad, because even one of its field identifiers are different, and therefore it is negative by itself.
Post back with any questions if I did not explain it clearly. Otherwise, I hope this brings up some useful ways of handling such a situation. I tried to make the examples very basic. I hope the attachment is there. I can't tell at this point.
Thanks,
Bruce
Comment