Please note that you are posting to the Report an Issue part of the forum. It is intended for posting possible bug reports. Had you posted this to the FM Pro Forum section (see tab at top of screen), your post would have been seen by more people and probably gotten a quicker response.
I see an issue in your script:
Go To Field [Contractptr::_fkContract]
appearst to put the focus on the wrong field. A foreign key field should not be editable directly by the user and is usually not visible in the portal. Change this step to reference the actual first field in the portal row and you will see the focus in the correct field, but you probably need a Go to Portal Row step here to put the focus in the correct portal row unless your newly created record automatically appears in the first portal row.
Yes I understand it is a foreign key, and by design the user is required to supply it (link this database with a processing system). To verify the foreign key field was not the problem, I tried Go To Field [Documents::InvoiceNumber]. Again the field is highlighted but until I click inside it or press the tab key I cannot enter data.
I have an old Filemaker 9, migrated to 10 to 11 and to 12, which does not have this problem. This database was develped from scratch in Filemake 12 and for some reason the ability to enter without manually setting the focus is problem.
Apologies for misreading your script. I mistakenly identified the field in your get field as the foreign key field updated by the script.
I cannot replicate this using a brand new file in FileMaker 12.02 on Windows XP.
When I run the script, the field highlights, I see the cursor in the fields specified in Go To Field and I can type data into the field.
I do note that you have mentioned two different occurrence names being used with your script: ContractPtr:: and Documents::
What is the table occurrence name specified for the portal? (It's shown in the lower left corner of the portal when you are in layout mode.)
Is there any chance that your get field step is referring to the correct field, but the wrong table occurrence for your layout?
Might there be any layout based script triggers that might be interferring with your script?
Your script might trip any of the following triggers:
OnLayoutEnter, OnLayoutExit, OnRecordLoad, OnObjectEnter, OnObjectExit, OnCommitRecords
I have attached a stripped down sample of the database I'm having the problem with. It has links to container fields and other databases, but I just want to demonstrate the Go To Field problem.
When the Add Contract # button is pressed, a line appears in the portal below the button and the focus is moved to this field. It is not possible to enter data however without clicking or pressing the tab button.
I installed Filemaker Pro Adv 12.02 on an old XP system to try, and under XP it works as expected.
You cannot upload database files to this forum, only files of type jpeg, gif or png.
You can, however, upload the file to a file sharing site such as Drop Box and then you can post a download link here.