January 21, 201213 yr 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.
January 22, 201213 yr Can you elaborate on "the technique of single portal rows to display Aggregate data"? Is this portal filtered?
January 23, 201213 yr Author 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
January 23, 201213 yr 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, 201213 yr by comment
Create an account or sign in to comment