Did you try Commit Record  ? I am not sure I understand what your issue is in the script.
When I commit the record, I lose focus on the portal. I want to commit the record and still stay on the same line and field in the portal.
Let me expand on that, because it's more than that. I cannot use the last line of a portal in a calculation (For example, in a time card entry screen, I have a box off to the side of the portal that calculates the total hours worked by a person on a particular day.) until I exit the portal (and not with a script, but with the mouse), even if I use the Commit Records script step. There should be a way for me to do this. I am using FM10 Adv on Windows XP
Thank you for your posts.
If your "box off to the side of the portal" calculates the total hours, then I assume that box calls a script. Since your record is now committed, the last portal row is now accessible. Therefore, go to the last portal row and execute the script that is attached to the box. For example,
Go to Portal Row [ Last ]
Perform Script [ <script that performs the same as the box> ]
Are you using the separation model by any chance ? Im just wondering why the total hours worked field is not updating.
I have an invoice layout, where items are entered in a portal, the totals (not on a portal) all update without using a commit step, or exiting the portal.
However using the separation model requires some trickery to re-evaluate the calculations.