Jump to content

Sort in insertion order


soci222
 Share

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

Recommended Posts

I need to sort my result page so that the record that the oldest record shows on top, the second one afterwards, and so on.

I found that if no sort field is specified I get just the opposite of that. I could use the ascending/descending sort option to solve this problem but "-sortorder" doesn't seem to work when no sortfield is selected.

Any ideas?

Thank you in advance

Link to comment
Share on other sites

Technically, an "unsorted" database is actually in chronological order, with the oldest record first and the newest last.

Carefully check your CDML code and see if there is a sort happening somewhere.

Alternatively, define an auto-entered serial number in your file (remember to serialise all the existing records after you define the field) and sort by this serial number ascending in the CDML.

Link to comment
Share on other sites

first, thank you for your promtly answer Vaughan.

You are right. Unsorted is just how you say: the OLDER the first, the newer the last. I was wrong when watching at my records.

Anyway, it's good to know that if I wanted the opposite I would have to use the autoenter ID number from filemaker itself.

Link to comment
Share on other sites

Hi soci222, To reverse sort (descending) you can also create a calculation number called RecordID with Status(CurrentRecordID). I don't usually like to encourage calculations if other more resource-friendly means are possible but it's a down-and-dirty way to accomplish the job quickly. And I find myself using RecordID for specific relationship needs and its value outweights the small resource cost. wink.gif

MoonShadow

Link to comment
Share on other sites

This topic is 6555 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
 Share

×
×
  • Create New...

Important Information

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