Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6859 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I would like to be able to open a file via an FM button and be able to tell the file which layout to open with.

Is this possible??

Thanks,

Mel

Posted

ooo!!! I think I know this one!

Simply go to the file menu and select "File Options". Tell filemaker what layout to open the file with. The button on your first file and layout need simply be an "open file" button then.

this should work perfectly so long as the second file can ALWAYS be opened using the layout you specify.

if on the other hand, you need to open the file one way (in one layout) and then open it with a different layout (from the other file), then, I'm at a loss.

and that was probably the initial intent of your question. oh well.

Posted

Make a script in the target file that goes to the desired layout and sets up the window as required.

In the source file, make a script that calls the script in the target file.

Posted

Thanks for the info Wanna-Be but you were, in the end, correct. I'm just getting started in this FileMaker business and the resources for knowledge are skimpy in the litterary sense. It's not like Visual Basic, for instance, where in about an hour of searching the web you could fill a warehouse with info.

I bought the missing manual and it's very helpful as a thorough once over. But when it comes to getting into code, where do I go??

Thanx,

Mel

Posted

Hi Vaughan,

Thanks for the reply.

I've looked through every source of info that I've got and cannot figure out how to pass a paramiter from a source file to a target file. Would it be too much trouble for you to show me an example line of code that does this?

Thanx,

Mel

Posted

What parameter are you referring to? The layout you want to open?

In FMP 7/8 you can specify it as a script parameter; earlier versions you either have to use a global field via a relationship, or create multiple scripts in the target file and ocall whichever script does the job.

This is not a difficult thing to do, you just need to get your head into the right way of thinking.

Posted

I've tried every thing this old man can come up with. I can create a script on one file that will open another file. I can create a script in the target file that runs when the file opens. But I cannot figure out how to get the source script to tell the target script what layout to open the file with.

I've found a book on BooksAMillion that's a FM8 reference manual but it hasn't been released yet (I pre ordered it)

Do you know of another book that's available now that would help me out with this type of thing?

Thanx,

Mel

Posted

Mel,

You don't need a book for this one. It's pretty easy as Vaughan described. Do this:

1. Create a script in the target file that does only one thing; Go To Layout ["Your Layout"]

2. Create a script in your source file that calls the script that you just created in the target file. (hint: near the top of the Specify Script Option, you can select the target file.

That's about all there is to it.

However, you should have defined a reference to the target file before creating either of the scripts. Search your Filemaker help for "file reference" and it will explain how to set a reference up.

This topic is 6859 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.