flowfield and calcsums

Is it not possible to use calcsums if you filter on a flowfield? I have a look-up flowfield to an option value that i filter on. Then i try to use calcsums on two normal decimal fields. I get an error telling me that i cant use calcsums when filtering on a flowfield. Does anyone know how to get past this problem? John

There is no getting past this problem. In order to use CALCSUMS, the field(s) on which you want to perform the sum must be defined as SumIndexFields in the currently active Key. This means that if you filter on a FlowField, this field would have to be included in a Key. Since this itself is not possible, there is no way to perform what you request. Consider a design change to work around this fact.

Ok thanks for answering. Dont fully understand why it would have to be part of the key, but i take your word for it…[:)] Thanks!

Check the “C/SIDE Reference Guide” available from the “Help” menu. Under “C/AL Reference by Category” → “DATABASE” → “CALCSUMS”, you will find the requirements for using SumIndexFields.

a redesign for the code is very necessary !! Filtering on flowfields is allways the slowest job ever