Optimized Sequence Sorting

Solving real world problems within FileMaker can actually be quite fun. It's a certain type of challenge which includes making something fast, efficient and easy to maintain. It's the type of thing which keeps us developers and learners going.

Like most all software products, which allow for a high degree of creativity, it boils down to knowing the feature set and what's possible. When you learn the underpinnings, and you can really wrap your head around what the limitations or consequences are, you can often come up with really creative data solutions.

In this video, I provide a solution to a problem which I had long forgotten about and previously solved. Yet, there it was, the same problem needing to be solved. The issue is related to sequencing a list of values so they sort in a specific order. When the order of values can be arbitrary and up to the user, you want to facilitate the sorting ability as easily as possible. When you try to solve this problem, you come across various issues related to how you chose to implement the UI portion.

So, with this video, I present to you the underpinnings of how I go about solving these types of problems by understanding how you can manipulate data within FileMaker. Sit back and relax as we take a look at Optimized Sequence Sorting.

AttachmentSize
OptimizedSequenceSorting.zip1.59 MB
Tags:

Comments

Hi Matt,

Very nice video as usual.

Another technique could be to set the sort field to the average of the sorts values of the "after record" and the following record.

This does not requires a loop nor modifying other records than the "from record".

--
Tom

Tom,
I really like your thought about only ever touching one record. However, with the default 16 digit precision it "only" takes 54 times of moving record 1 to after record 2 to break the sequence. Using SetPrecision to max gives (some really big number that requires a math wiz to figure out) that even the most dedicated bored user is unlikely to break. Matt's method won't break (I think) as it would just roll over into the next whole number sequence after 10000 reps. But, it does have the issue of multiple record locks. Working with several hundred users makes me try very hard to avoid that. YMMV
--
BruceB

I did not think of the default precision, you're absolutely right ! With 400 precision, it should be ok for most usages.
I made an example, it seems to work nicely.

--
Tom

Thank for the video. Always exciting to learn techniques. I am curious if I have not mistaken, this technique won't work 100% in the case of multi-user when environment where each user wants to sort the same set of records differently. Correct? Because the *sort* field is just a normal field shared among all logged-on users. Any suggestions for sorting records in this case? I do have a technique I use but haven't tested on large set of records (say > 15o records). Interesting to see how others tackle this design requirement.

FileMaker Dreamer & Designer