remove line 7. That probably is refreshing the display. do you have a script trigger on the layout that is running on layout enter? Otherwise you can create a new window off screen and close it in this script.
Is there a script-trigger on the biochemical-layout or the field Biochem::_PatientuuID?
I've removed line 7; no effect. There aren't script triggers on either biochem layout or Biochem::_PatientuuID but there is a 'stay on panel' trigger on the tabs to prevent the User leaving the Calc tab (the one the User is automatically taken to when the Patient_U layout is opened) if 2 specific fields are empty.
I've tried missing out Go to Patient or original layout and instead going to the portal object, but of course that does not work.
but there is a 'stay on panel' trigger on the tabs to prevent the User leaving the Calc tab (the one the User is automatically taken to when the Patient_U layout is opened)
Are your sure this isn't firing a trigger script in Line 6? Seems like it would.
maybe you should "tweak" the "stay on panel" trigger a bit together with the "create new biochem" script:
add two lines to your "biochem" script:
line 2.5: Set-Variable ( $$notrigger ; 1 ) and line 9: Set-Variable ( $$notrigger ; "" )
Add and exit-script within an if-end at the beginning of your "stay on panel" script with $$notrigger = 1 in the clause.
and try again
There's a different approach that you can use to create your related record that leaves tab panels unchanged and does not trip any script triggers:
If you websearch MagicKey, you can find some excellent articles on the technique. If you search this forum for an instructional file called:
Adventures In FileMaking #2
The final example, "Buton Bars as Value Lists" uses this method if you want to see a working example.
Tweaking the stay on panel and new Biochem scripts worked fine.
Phil: I'll read up on magic keys. It won't be the first time I've later gone back to your suggestion as a strategic improvement.
I'll do some reading!