Jump to content

Loading sorted records from server


nexgen

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

Recommended Posts

I have some sub-summary layouts which needs sorted records. Since, my file is hosted in filemaker server in cloud, all the records are fetched first before sorting.

This is causing some delays and I'm imagining what will happen if there will be lots of records.

Is there anyway to speed it up?

Link to comment
Share on other sites

No, they don't have to be; if you loop through the records and collect the data and put them into the right 'summary' buckets then you can create the records in the scratch table in the order you want them to appear on the report.  No sorting needed.

Link to comment
Share on other sites

Say that you have these records with 3 columns (car make and how many sold in what month):

Chrysler  March 100

Mazda February 50

Chrysler February 200

Honda January 90

Mazda January 40

If you want to show the totals per car make then you can use your subsummary by sorting the records by car make and defining a summary field for the total sales.

But you can also loop through the records (physically or using GetNthRecord) or use another aggregating technique to load the data you need in a variable to loop through (HyperList has a very interesting readup on the pros and cons of all of them: http://www.modularfilemaker.org/module/hyperlist/)

And as you go through your list you can keep track of 'buckets' with their totals, all in variables

$sales[ code("chrysler")] would be the Chrysler bucket for instance, just keep track of the names of each bucket in a separate list, for every record, add the sales value to the sales bucket for that car make.

Once you are done looping through your records / list, go to your scratch table and create one record for each bucket item (car make) and set the field to the what is in the $sales bucket for that car make.

  • Like 1
Link to comment
Share on other sites

This topic is 2600 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.