April 16, 200421 yr I am running a script that essentially looks like this: Go to Portal Row [select, Last] Set Field ["transactions::account_number", "12345"] All field types are text. What happens is that instead of "12345" being inserted into a new record in the "transactions" portal, a value from a completely different field ("company_number") is inserted instead. It dosn't matter if I change the "12345" to reference a field, it still sets the "account_number" field to the "company_number" value. If I take out the Go to Portal Row [select, Last] script step, the Set Field step works like it should. The problem appears whenever the script tries to create a new record. Normally I would try to come up with a different way of setting the field (copy / paste method for instance), but the very same script USED to work, and I am very uncomfortable with this strange behavior. Is this a symptom of corruption? What can I do? FileMaker Version: Dev 6 Platform: Mac OS 9
April 16, 200421 yr Author Update: When I modify my script to include the "Go to Field" step... Go to Portal Row [select, Last] Go to Field [transactions::account_number"] Set Field ["transactions::account_number", "12345"] It functions properly again. This is the strangest thing. Either something is wrong with my files (corruption) or I changed something without knowing the consequences, or some weird bug. I don't know.
April 19, 200421 yr Author Umm, I think the problem is with me! The same problem cropped up when I was cleaning up a script; the same thing must have happened before. The issue is this: "Set Field" does not seem to work properly when creating related records in a portal (at least using a field with a value list?). Like I previously posted, inserting a Go to Field script step pointing to the target field before you "Set Field" that field works. I guess it could be considered a FileMaker bug, but it's also my problem.
Create an account or sign in to comment