AnsweredAssumed Answered

Comparing Summary Fields from Filtered Portals After Using One Line Portal Trick

Question asked by Tusquittee on May 6, 2013
Latest reply on May 12, 2013 by philmodjunk


Comparing Summary Fields from Filtered Portals After Using One Line Portal Trick





I’ve been trying to compare summary data from a filtered portal and I’m not sure how to go about this.


On my class detail layout from tbl Classes I have a portal that displays information from my Reg Data table.  The portal displays student information including a status which indicates if the student is enrolled, withdrawn, or cancelled.  


I used the trick where you create a one line portal with a summary field to determine a lineitem count.  So far so good, (or so I thought!)  I have four separate one line filtered portals with summary fields which indicate how many students total, how many have cancelled, how many have withdrawn, and how many remain enrolled. This works well.  I can change the status of each student and the summary fields populate as expected.


The next thing I would like to do is to have a field, Classes::Available Seats, which is a calculated field that takes a maximum number and subtracts the actual enrolled number to determine how many seats are left in the class.


So... something like Classes::Maximum- Reg Data::Enrolled Count


When I realized this wasn’t working I created separate table occurrences named Reg Data for Enrolled, Reg Data for Cancelled, Reg Data for Withdrawn... and changed my one line portals to evaluate the summary fields from that perspective.  This too works in terms of my summary fields..... Yet, I still cannot determine how to make the subtraction piece of the puzzle work.


I changed the calculation for Available Seats to

Classes::Maximum-Reg Data for Enrolled::Enrolled Count.......but still no luck....should I be scripting this instead?


Any suggestions or thoughts on what I’m doing wrong? Thanks in advance,