AnsweredAssumed Answered

Comparing Fields and Moving Orders

Question asked by cynthiablue on Nov 21, 2018
Latest reply on Nov 22, 2018 by Ben

Not really sure what to use for the subject.


I am writing secretarial software for a dog sport called Barn Hunt.

The dogs go into a blind of five dogs, and then one dog runs at a time. Then the course is changed, the next five dogs go in the blind then run, rinse, repeat.


I am writing a running order that splits all the entered dogs into blinds of five dogs per blind based on what level they are in (Novice, Open, Senior etc). That part is working fine.


The same handler can run more than one dog. But that same handler cannot be in one blind twice. So if handler A has 3 dogs entered in the same level, they have to be in three separate blinds, each with a different dog.


So my problem is that I need to see if one person is in a blind with more than one dog. If so, move that person out so that they only have one dog in the blind, put them in the next blind, make sure they only have one dog in that blind, etc etc. But then also put another dog/handler team in the blind so that the number of teams in a blind remains at 5 (unless there are not enough teams left to make 5.)


Here is a picture of part of my table. See that I have a field name called Blind and each dog is assigned to a Blind. Where there are five records for blind 1, it increments to blind 2 etc.


Screen Shot 2018-11-21 at 12.21.46 PM.png


I'm not exactly sure how I can go about comparing the dogs/handlers to make sure that the handler only has one dog per blind. Maybe I can do a Perform Find and see if there are any two records with the same handler in the found set? But then I need to change the blind number for that handler (and there could be more than one handler with multiple dogs), then check the next blind, etc.


The logic as well as how to manage this in Filemaker is puzzling me, and if anyone has any suggestions I'd love to hear them, thanks!


I'll attach a copy of my Blind Order Test PDF that I have it producing now.