MariaAux Posted January 21, 2012 Posted January 21, 2012 I have a dashboard in my school Information Management database. I have used the technique of single portal rows to display Aggregate data such as how many total classes there are during the week and a differnt portal (& table) to display how many students attend classes (Some once a week, some twice). Ok, so far so good, 36 classes, 193 class attendees. How on earth's name can I create a calculation that shows me the average no. of students per class. (5.36) because as soon as I take this summary aggregate field out of the portal it displays just a single records data? Mmmm, I'm a bit lost here. Thanks in advance for all your help.
comment Posted January 22, 2012 Posted January 22, 2012 Can you elaborate on "the technique of single portal rows to display Aggregate data"? Is this portal filtered?
MariaAux Posted January 23, 2012 Author Posted January 23, 2012 Yes, the portal is filtered. Thus, I have a summary field in the original table that displays the right count for the filtered data whilst it is within the portal on this table. Thanks so much
comment Posted January 23, 2012 Posted January 23, 2012 (edited) Well, the thing is that filtered portals work on the layout level. Usually, you want your calculations to work on the data level, so that they keep on working independently of what is (or isn't) on a specific layout. If you don't want to do the filtering by relationships, you need to make your calculation look at what's happening on the layout - instead of at the actual data. This is where the GetLayoutObjectAttribute() function comes in: give the summary field instance on the layout an object name, and retrieve the filtered aggregate value by = GetLayoutObjectAttribute ( "YourObjectName" ; "content" ) Note, however, that the result of the calculation is available only while you are on the layout containing the object. If you need it anywhere else, you should move the entire thing (starting with filtering) to the data layer. Edited January 23, 2012 by comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now