@Sum from subcategory of categorized view

Hi folks,

there is a big challenge for me :

We have a categorized view, let’s say “Order Intake categorized by Person”.

In a form I have a field, where I want to calculate the order intake of a specific person (whose name is in the form as well).

E.g. it works to add an embedded view an filter only that person’s values.

This is my attempt to calculate the person’s sum into the field :

we set a filter on the view :

@SetViewInfo([SETVIEWFILTER];@Name([CN];personname);“Name”;1);

we calculate the sum :

@SetField(“field_of_sum”;@Sum(@DbColumn(“”:“”;“”; “OrdersByPersons”; 7)))

(in the seventh column of the view we have the order intake)

… But the result is always nil.

Any hints would be highly appreciated; will this method work at all - or is there a better way to achieve that summarization ?

Thanks in advance.

Subject: @Sum from subcategory of categorized view - Solved !

STOP - PROBLEM SOLVED

For Information :

Sorry, I was wrong. Doing this we need the @DbLookup function. This works well :

@SetField(“Result”;@Sum(@DbLookup(“”:“”;“”; “ViewByPersons”; @Name([CN];FromWhichPerson);7)))

so we get the Sum of all entries in column 7 of the view.