February 8, 200620 yr If my goal is to write a script which will create a record in a table, and my goal is to also make this script as generic as possible (so it can be called from any layout/table), here is what I used to do: (Assume FM8) MakeARecordInTableX(id) Set Variable $id = Get(ScriptParameter) Freeze Window // to prevent flashing Go to layout (TableX) New record/request Set Field (key = $id) commit records go to layout (original layout) end script Now, this works great. this script can be called from anywhere in the solution, no matter what layout/record you are on, and it returns you to the same place you left off. The problem is, that under FM8, if you started on a tab panel, when this script exits you might be left on the wrong tab. One work-around is to start and end the script with "New Window" and "Close Window" steps. This seems to fix the tab panel problem, but even if you put in a "Freeze Window" step, you still get a big blank window flashing on screen. I know I could do this using relationships and the SetField command, but that requires that you know what table you are looking at, which make the script be no longer generic. Has anyone solved this problem? Edited February 8, 200620 yr by Guest formatting
February 8, 200620 yr I had this same problem. You can add a Go To Field script step that will go to a field that is only on that tab.
February 8, 200620 yr Author To use a 'go to field' step, wouldn't you have to know ahead of time which tab you are on, so that when you exit the script you can choose the right tab? Note: I claimed earlier that bracketing your script with "new window" / "close window" commands would prevent the tab panel from switching, but i appear to be wrong about that, at least in some preliminary testing.
Create an account or sign in to comment