AnsweredAssumed Answered

Using values from portal lines in a calculation

Question asked by KhomanPhang on Sep 25, 2014
Latest reply on Sep 26, 2014 by KhomanPhang


Using values from portal lines in a calculation


Hello. I'm trying to do something pretty straightforward and am very close but final step alludes me. It involves calculations using data found in a portal and is related to posts Calculations with portal data. and Using values from portal lines in a calculation.

I am tracking attendance and want to determine whether a student was present on a given day.  I have two tables, a Students list and an Attendance_Log:

Table 1 (parent), Students, with the following fields:
   - Student ID
   - Name

Table 2 (child), Attendance_Log, with the following fields:
   - Student ID
   - Date

Attempt 1: Using a portal 
   I successfully created a portal on the parent table, and can see
   all the dates that a student attended class. But how does one go
   about searching inside the portal for a specific date?
Attempt 2: Using a calculation 
   Alternately, I tried adding a calculation field in the parent
   table to determine whether an entry exists for each student for a
   particular date. Conceptually, the calculation would be 

      Students::Sept1? = If ( Attendance_Log::Date ="Sept 1"  ; yes ; no )

   but this calculation fails because the result only represents the
   result of the search of the last matching record, and not of all
   the matching records
found in the child table.

Knowing how to work with the portal data would open many doors. Any help is much appreciated.