I have a script that contains at a least 15 loops that access and process through as many as 100 records. My solution is hosted on a service on server 14. My solution has been created in 13.
When I run this script on web direct it runs in 2 seconds (I presume because it is running on the server).
When I run this script on direct client (open remote) or iOS it takes several minutes or chugs forever (again because i presume it is running on the client and a lot of data is choking back and forth)
I don't think that I can optimize the script because it requires going to each record, setting a variable to the value of a score in that record, then moving to the next record, comparing the variable to the value of the score in that record. Then, if the values are equal, assigning an equal ordinal to a field in both records, then bumping an ordinal variable up + 1 or + 2, etc. to accommodate the tied situation. This loops until the last record has been dealt with. I am finding ties and assigning places with ordinals. When I built the script on my mac, I didn't notice a problem, because the script ran lightning fast. As it is now, the script is unusable when hosted. I thought about just using the replace field contents command, then assigning serial numbers for ordinals, then constraining my found records with !, this would find my ties. Then I could use the comparison technique mentioned above on far fewer records. Filemaker won't let me constrain a clean find of my first find set and the duplicates within that set. I have already done some successful work with self relationships putting a summary of all records in a portal on each record, but I don't know how to use this alien context concept for constraining my found set, as has been suggested online.
I want to give psos a try, but, I can't figure out how to do this or if it would even be practical with my 200 + lines of code. I have tried calling filemaker help, but they "are not developers". The online filemaker psos instructions are too limited in scope or detail for me to understand in the context of my database solution. I am doing something wrong or leaving something out. I can upload one of my loops if that would help.
Thank you anyone! I am self taught and apparently I am not the best of teachers in this area. I also have difficulty assimilating filemaker jargon, although I keep working at it.