The commit records will remove the focus from the portal and then there is no portal for Delete Portal Row to delete.
But I don't quite follow what closing a popover has to do with deleting a portal row. Can you describe your design in a bit more detail? I would think that clicking a "delete" button inside the portal row would first trigger the onExit script and commit the record, but then go ahead and put the focus back on the portal row as the last event processed via the mouse click, but haven't tested that assumption.
Also, what version of FileMaker are you using? 13 or 14?
my script to commit is triggered off popover panel for on object exit so that the displayed portal records will sort after the user closers the pop over.
I am using FM14
I got that part. How are you performing the delete portal row script?
You might want to code the commit like this:
Set Variable [$Row ; value: Get ( ActivePortalRowNumber ) ]
Go to Object ["objectnameof PortalHere"]
Go to portal Row [$Row ]
The delete is a single step button.
I just tried your recommended commit code. it does allow me to delete but it does not cause the portal records to resort. it is a task list and the main thing we change is dates and times. My users like to see it resort after they tweak the time.
I just realized that shouldn't work anyway as the portal row number will change once the portal updates to a new sort order.
Remove that code and try putting a 1 second pause (pause/resume [1 second]) at the end of the script. If that works, you can try reducing the pause to a small fraction of a second or even zero seconds.
I tried the timer after the commit but that does not appear to be working. I tried to make a work around to open the related record in a new window and delete it but I am getting an error that might be the root cause of the problem.
it says "This operation cannot be performed because one or more of that table relationships are invalid." I inspected my table relationships but it appears to all b in order. Any ideas?
What do you mean by "timer"? this is just a pause/resume step, not InstallOnTimerScript.
The error message would seem to indicate that, from the context of the layout where this takes place, your relationship is not valid. But I don't know what relationships you have here...