Need Help with Script
Hey guys, I already made one post about this, but I feel as though I did not explain my problem correctly.
This is my project: I work for a company with nearly a million patient records, which is stored in a database in Filemaker. Due to periodic imports, we need a script that will auto-update the main database with the updates given in a second layout. I have attached below a picture showing an example of what the two layouts might look like. The "Test Database 1" represents the imports of changes that need to be made, and "Test Database 2" represents the main database with patient records. I have also included at the bottom of the first picture the "Test Database 2" if the script were to work correctly. As you see, it changed the first patient's insurance name and the 2nd patients name. I tried scripting it, and here is my current script (with different layout names because I can't show real patient info!) http://i.imgur.com/yNWBkZo.png
**Note** "Changes to Make" in the script would be "Test Database 1" and "BTWeeklyReport" would be "Test Database 2
The hard part about this is that because the target fields to change are variable and I need to find and match the patient records, that I cannot use many of the commands in the scripting of filemaker. The problems I am running into at the moment are: the script does not loop through properly, no changes are being made, and the variability in what fields need to be changed mess me up.
Also, would there be a more preferable way using finds to script this?
Any advice would be greatly appreciated.