Pushing term 1 results into term 3 fields for new students joining mid-year

前提是你 提交于 2019-12-25 05:26:10

问题


I have a table that contains test marks from different terms, ca1_percent, sa1_percent, ca2_percent and sa2_percent. These 4 fields reside in the Results table that contains results from the different terms.

I used a self-relationship linking using the matched field overall_percent_match which is calculated using year & " " & subject & " " & _kf_studentID. This relationship allows me to obtain the test results from past terms (of a year). For example, my term 3 results will contain results from term 1 and term 2 (of each subject). All works fine unless there is a new student who joins mid way of the year. If he joins in term 3, his ca2 results (done in term 3) will fall into his ca1_percent column (which is supposed to contain term 1 results) like other records before him.

Image shows what I mean.

I could not figure out the solution. Can anyone help me?

This StackOverflow link contains more details of my work that was done related to this problem.


回答1:


The underlying problem, per your prior query, is that you're pulling the values through:

GetNthRecord(SA1_Results_Match::mark_percent,2)

This statement assumes the existence of an N=1, N=2 and N=3. To make this work properly you could do any of the following:

  1. Ensure that your Results table always has records from the prior semester, even if the student joins later in the semester. You could keep using GetNthRecord this way, but you will always need to ensure that the records are in order.
  2. Use an ExecuteSQL statement to gather only the correct semester's results for the correct summary field.
  3. Make four separate relationships, with separate Table Occurrences, to define ca1, sa1, ca2 and sa2 each separately. This looks like what you started out trying to do in the prior question.


来源:https://stackoverflow.com/questions/16852240/pushing-term-1-results-into-term-3-fields-for-new-students-joining-mid-year

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!