Jump to content
Server Maintenance This Week. ×

Filtered portal or calculation field for summaries?


Angus McKinnon

This topic is 1824 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Here’s the scenario. I’ve got a “Monthly Report” layout in my database, which has a collection of portals showing 

There is a “Monthly Report” table which is linked to Orders via a many-to-many relationship. Each portal then filters based on multiple criteria, a combination of the date range and division/category. This way rental is separated out from sales income etc. etc. I’ve set up summary portals as well, using the single-line technique that I learnt from another thread here. 
 
So far, this is all working well and the admin staff are finding it really useful. Naturally, this makes them ask for more features. The latest request is to be able to see the performance, month-by-month, on a graph. I’ve been playing a little with graphing and can grasp the basics (after a few amusing mis-fires). However the tricky bit is how to deal with the summary values.  
 
I’m planning on setting up one record per month in the “Monthly Report” table which has the start and end dates set as fields. At the moment the summaries are created “live” by the portal filtering, so presumably only exist when that filtering is live, in front of the user. I can use a Get statement to copy the value out of the layout object, but I don’t imagine that’ll work unless I use a script to go through each record in turn, which seems cumbersome. 
 
Am I best to just come up with a calculated field of some kind which replicates the filtering for each portal? Or is there some smarter technique that I’m blissfully unaware of?
Link to comment
Share on other sites

Thanks for that link - seems like a very sensible way to tackle it. 

I'm imaging that the best way to proceed is have a script set variables from the summary values out of the filtered portals (using GetLayoutObjectAttribute) and use that to populate the summary table. Let's see how I get on...

Link to comment
Share on other sites

If you're using a script, then you won't need the filtered portals. Just have your script go to the Orders table and collect the summary values from there. You may want to learn a very useful method called Fast Summaries by Mikhail Edoshin for this purpose.

Link to comment
Share on other sites

This topic is 1824 days old. Please don't post here. Open a new topic instead.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.