Originalwindow and rememberwindow

In Filemaker, one often wants to go to a different layout (forms, in PX) and then come back to the original. I found the following info in the PX help files:

The rememberwindow statement remembers the currently active window, so that you can get back to it later.


This statement remembers the currently active window. You can get back to this window later with the OriginalWindow statement. Note: The RememberWindow and OriginalWindow statements must be in the same procedure.



Question: can the window I want to go to be in another database?

Yes. The window can be any open window in any database. The reason both statements must be in the same procedure is that the name of the window it is remembering is being stored in a local variable.

A local variable belongs to the procedure that declares it, and it is in scope when that procedure is running, regardless of which database happens to be active at the time.

David is correct, but I am wondering if this feature is really similar to the FileMaker feature you are mentioning. The Panorama rememberwindow/originalwindow statements require that the original window remain open. If it gets closed, the original window statement cannot be used to get back to it.

I’m not a FileMaker expert or even a beginner, but I’m thinking maybe in FileMaker you are flipping back and forth between forms within the same window? Panorama can do that, but only within the same database. And if you wanted to remember, you would have to do it yourself, something like this:

let originalform = info("formname")
goform "New Form"
goform originalForm // back to the original form

But Panorama can certainly achieve the same visual result for forms in different databases by making them occupy the same space on the screen.

FM only has one “window” open at a time. A window is associated with a layout (a form in PX) and a layout is associated with only one table (a database in PX). In FM everything is wrapped in one file, all tables, layouts, and scripts (procedures in PX). Scripts are not associated with a single layout which is based on one table (scripts are global). But of course the code in a script must be compatible with any layout it uses.

So when I have a script that is working with data via a layout (hence its associated table) and then must access data in another table for related fields, that part of the code must “save” the current layout and then open another layout to access its table’s data. When done, if necessary, it returns to the original layout

This seems to be the same situation with PX. Thanks for providing the “let” example above. And all I’m interested in is jumping from one form to another and back, using different windows.

I must say, I like the idea of having two widows (different forms) open side by side.

In a Panorama file (table), many forms can exist as well as many procedures. There is no relation between forms (layouts) and procedures. A procedure can open or work with multiple forms as well as operate on other files (tables). And to confuse things further, a form which belongs to a specific table, can display data retrieved from a 2nd table as well as allow user input of data destined for a 3rd table. Your opportunities are near unlimited. I am not going to suggest that this might be the standard way to interact with different tables but I am just offering that your design, with near any desire, can be accomplished if it is really what you want or need.

If you are needing to ‘access data in another file’ (table), there are many ways to do that without switching to another file or another layout. Panorama has Lookups as well as Relations (after files are linked via key fields or formulas).

Relations are where you should look first as Lookups are the old way. The ‘Let’ is essentially an assignment.

No, usually you would have different forms open in different windows, and can just click on the window you want, or use the View menu or the Window menu.

Well, I would have called this a “goform” example. Goform is the statement that allows you to switch to a different form in the same window, without opening a new window as you usually would do.

The “let” statement creates a local variable, and assigns a value to it. This doesn’t have anything to do with forms or windows, it’s just a general way to temporarily store a value and then use it later. In this case I defined a variable named originalForm.