I imported an application from FM4 to FM10. Table A and table B connected with an Id. Layout of table A with a portal where table B records are shown.
Because I often enter portal records with several fields having the same data, I have a few variable fields on the layout and a pushbutton launching a script that does:
Go to Portal Record(Last) - this creates a new portal record
Set (portal) field x from variable x
Set (portal) field y from variable y
Go to Field(Z) - this is where I want to enter values.
In FM 4 this worked like charm. Clicking on the pushbutton always gave me a new portal record with default values filled and the cursor in the field where I wanted to enter a value. But not so in FM10. The weirdest things happen. FM10 overwrites the values in the first portal record. Or the second. Anywhere but the last "new" row. My last test: There were three portal records. Clicking on the pushbutton made Set Field update the default values in the second portal record and Go to Field put the cursor on the first portal record to wait for my input.
Now, if I first put the cursor in any field in the portal by clicking the mouse there, and then click the pushbutton, everything works fine. I have checked the relationships and everything several times and cannot find anything wrong. Simply what worked in FM4 doesn't work in FM10 although it should.
Am I missing something here, or....