How do I open a dilemaker database with a button in a different database?

I have a filemaker database with several navigational buttons that is suppose to lead to different databases.  I would like to know how can I open the database in a new window.  Also, how to close that window when a user in new window clicks on "Return To Main Menu" button.
j_ramesesInfo Sys MngrAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

To do this, your master navigation file will need to have file references to each file your attempting to navigate to.  Next either in an opening script for your navigation file or in each button, you must run script step "Open File".  Normally I'd recommend having one script that runs when your navigation opens, that will do "Open FIle" XYZ with the "Hidden" option checked.  This will cause all the files to be opened on your host but not displayed.  Next, I would place a script in each of your files that does a setup of the window, goes to the correct layout, and so on.  Once you have this, its just a simple case of calling that script with the Perform script operation from your navigation button.  You would also want to include a step that will do a close window or hide on the navigation window when these are selected.

So to recap.
-Navigation file, create file references to each of your seperate databases, and have a opening script open all these files.
-Navigation buttons should call a new window script of some sort in each of your created databases, and hide the navigation window.
To better explain this, I've included a zip file, it contains 3 files, 1, 2 and 3.  1 would be your navigation page, and 2 and 3 would be the jump to databases.  Extract the zip and rename the files to 1.txt to 1.fp7, 2.txt to 2.fp7, 3.txt 3.fp7
j_ramesesInfo Sys MngrAuthor Commented:
where do I go to rename the file to extension .fp7 from .txt?
right now the only thing that is visible is file 1, 2, 3 without extensions.
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

j_ramesesInfo Sys MngrAuthor Commented:
i figured out how to change the file extension

I'm assuming your on a PC, to do this in an explorer, click Tools > Folder options, under the view tab uncheck 'hide extentions for known file types'.  This will let you see the extentions to rename them.
j_ramesesInfo Sys MngrAuthor Commented:
i take it that all the related files have to be on the same folder?
if they were in different folders what would be the script?

The scripts all remain the same, it would just be the file references that would change.  The nav files would have to have its 2 references changed to map to the other folders, and each of the child databases would need their reference to nav updated as well to link back.  In FM 9 this is File > Manage > External data sources.
j_ramesesInfo Sys MngrAuthor Commented:
what does the "File 2" represent in file 2 script line #2 = New Window [Name:"FIle 2"; Height 20]     ?
j_ramesesInfo Sys MngrAuthor Commented:
i am writing the script for one of the buttons on my main menu.
I called it contacts.
I selected Open FIle.
I check-marked OPen Hidden.
Now I am at specify, there are three options to chose from:
    1) Add filemaker data source
    2) Add ODBC  Datat source
    3) Manage data source

Please provide details.
thank you
It appears you do not have a data source yet, so select manage data source, and then click add, find the file you wish to add, and click ok.  You will then have this file in the list as a data source, where you'll be able to select is as a file open option, access scripts / tables from it, etc.
"File 2" is simply the name I've given the window, it could be anything you wish there.
j_ramesesInfo Sys MngrAuthor Commented:
i am now in the database that was part of the first link in main menu.
i am up to : Open File [Open Hidden;   ]
when i hit specify there is no option for me to select  the current database.
it does not allow me to enter the name of the database
what are the steps when i get to specify?
From the second file you will want to go back into manage data sources, and select the navigation file again.  You will not need to do an open file [open hidden] as the file is already open, but it will not hurt anything if you do.
j_ramesesInfo Sys MngrAuthor Commented:
do you mean through "open file" in Files selection?
j_ramesesInfo Sys MngrAuthor Commented:
got to go.
can we finish this tomorrow early?
Each database when working with multiple require a reference to each other to be able to communicate between themselves. So if you have 3 files, A,B, and C, since you want to from A (The navigation file) to speak to Files B and C, in File A you need to go into File > Manage > external data sources, and add 2 entries, one for File B, one for File C.

Now from FIle B and C you only need to be able to tlak back to FIle A, to reopen your navigation, so these two files need only a data source reference back to file A.  Once these steps are complete you can then access scripts across the files, or whatever else you need.
j_ramesesInfo Sys MngrAuthor Commented:
i am now in the database that was part of the first link in main menu.
i selected : Open File [Open Hidden;   ]
here you have the name of the file after the ; in parenthesis.
where exactly and how do i configure to allow me to enter the database "Contacts"?
how do i get the "Contacts" after the ; in Open FIle?
This is where you'd want to create a script in the contacts database, that will create a new window, goto the layout you want.  Once you have this, you will perform this script from your navigation button within the first file, like in the example I sent above.
looks a bit complex to me...
to sum up:
create external references as mentionned for all extenal files in the main file.
either simply open file(reference), and that creates a new window; when you close it you're back to the original one which was in background then. (no need for z return button)
or create a layout for the external ref file in the main file, and use "new window(params...)" and "goto layout" to show it. and same , simply close it to return to main file.
j_ramesesInfo Sys MngrAuthor Commented:
this is the script i have, please advise what i did wrong:
The first database is where the buttons will go.
Name of database=Main Menu
Layout name=Main Menu
Scriptname=Go to Contacts
Script is:
Open File [Open Hidden;"Contacts DB"]
Set Window Title[Current WIndow;New title:"Main Menu for Company Name"]
Adjust Window[Resize to Fit]

This is the database it is suppose to goto:
Name of database=Contacts DB
Layout name=Contact Personal Information
Name of script=View Contact Information
Script #1 is:
Close Window[Name:"Main Menu for Company Name"]
New Window[Name:"Contact Personal Information"]
Goto Layout["Contact Personal Information"(ACCR Contact Table)]
Adjust Window[Resize to fit]

Name of script=Back to Main Menu
Script is:
Close Window[Current Window]
Perform Script["Go to COntacts" from file:"Main Menu"]
j_ramesesInfo Sys MngrAuthor Commented:
i forgot to menyion that when i click on the button in Main MEnu to go to Contacts it just brings me back to  Main MEnu with the Resize to adjust executed(smaller screen)
j_ramesesInfo Sys MngrAuthor Commented:
another thing when I click on the button Return to MAin MEnu in the Contacts database, it just closes that database.
I did not check in details but first of all you cannot close the current window before opening another one if there is only one window open. open the new one and either keep or close the original one
j_ramesesInfo Sys MngrAuthor Commented:
how exactly would you write the script and which DB
j_ramesesInfo Sys MngrAuthor Commented:
attached is a word document showing images of exactly what I have
j_ramesesInfo Sys MngrAuthor Commented:
forgot to mention that these databases reside in a server.
there is almost no script to write, just open the remote file and leave the "menu" open at the back.
when you close the remote file, the menu is there. no need for a return button as long as the remote file is opened in a new window.
where are the layouts for remote files, in the remote file or in the menu file?
j_ramesesInfo Sys MngrAuthor Commented:
I found the solution to my problem.
Below are the scripts to use:
How to create navigational buttons to/from different DBs

We will start by opening the homepage that contains the first set of buttons.
Below is an example of the step by step instructions on what to script.

Database name = Main Menu
Button name = Contacts
Layout name = Back to Main Menu
Script names = Go to Contacts & Back to Main Menu

Below is the layout for Main Menu from DB Main Menu:

Next you will select Scriptmaker from Scripts on the menu bar:
Below you will find two scripts, one for each button as well as one script that will be added on to each button, Back to Main Menu.


Here you can see script Go to Contacts which will go to the Contacts DB.
Here you can see script Got to Resource Library which will go to the Resource Library DB.
The final script Back to Menus will go to every button created on the Main Menu DB.

Below you will see the script for the Go to Contacts script:


Below you can see the script that will go on every navigational button to different DBs:


Below is the layout from layout name Contact Personal Information from DB Resource Library:


Below are the two scripts that are part of Contacts DB:


Below is the script for script View Contact Information from current table Contacts:


Below is the script for Back to Main Menu from the DB Contact DB


This script will go on every page that has a Main Menu button.

j_ramesesInfo Sys MngrAuthor Commented:

Attached you can find the steps involved.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
FileMaker Pro

From novice to tech pro — start learning today.