Standstill
Standstill

Reputation: 399

Adding field contents

I have a Results table that contains the mark_percent and overall_percent of students in a year(with 4 terms). Some records contain marks from term 1, some from term 2 etc. I want to add the mark_percent such that term 2 overall_percent contains only the sum of term 1 and term 2 or the overall_precent for term 4 contains the sum from term 1 to term 4.

My current implementation using self-join relationship gave me a sum to the latest term. E.g. if I have up to term 4, when I were to look at the records from term 1, the overall_percent field also contain the sum to term 4. What I did was to create a matching field( using calculation field year & " " & subject & " " & _kf_studentID and match two self tables using this field).

What can I do to solve this problem?

enter image description here

Upvotes: 0

Views: 37

Answers (1)

pft221
pft221

Reputation: 1739

Relationships can be formed on multiple terms and inequalities. So, assuming you have a value term with a value of 1, 2, 3, or 4 you could set up your self-join like this:

Results::overall_percent_match   =   Results_Match_Overall::overall_percent_match
Results::term                   >=   Results_Match_Overall::term

(You can double-click the line/equal-sign connecting the two table occurrences to get to the more detailed relationship editor.)

Upvotes: 1

Related Questions