Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Button Script: Goto layout in other database

Featured Replies

I'm a noob with filemaker. How can I make the button goto a layout in a different database? I have the relationships set up, but the goto layout in the script only shows the layouts on the host database. Thanks!

To change a layout in database B from database A

Make a change layout script in database B, then activate it from a script in database A.

Script in database A:

Perform Script, External (from db :, Change Layout

Create a script in your related database

Go To Layout [x]

Now, from your main database, create a script

Perform Script [external, your related database, The script above (whatever you called the script) ]

There you go.

To jump from one database to another, you do not have to have a relationship. You only need a relationship if you want to go to a related record(s) from the current record in the first database.

HTH

Hey there,

Would there be a way to make it so that the new layout appears in the same window ? (I guess I could issue a "close" command to close the old layout, but it still opens a new window for the new one).

Thanks !

They are seperate databases, so they have there own windows.

You could maximise the databases, then you wouldnt know that another database (window) was opened.

  • Author

Thanks for the replies, I knew it was something simple like that. I am now having problems with my copy/paste. In my 'contact' layout, I have the button to create a new address for a particular client (which is tracked in it's own database, ovbviously). The client is tracked through the system using a 'MIS number'.

My script for the button on the 'contact' database is:

1. Copy (select entire contents is checked, and I specified the field to copy 'co mis number')

2. Perform external script.

On the address database end, I have the script:

1. New Record/Request

2. Paste into MIS Number

When I browse to the record when I put something in it, it doesn't paste anything into the mis number field.

Make sure that the fields are on the layouts.

Copy and Paste only work if the fields are on that layout.

Yes, copy & paste require that the fields be visible on the active layout at that moment in the script. To get around that, you could use Set Field instead. This does not require fields to be visible. You could make a global field in your A database, call it gMIS_Hold. Your script in A includes a line:

SetField(gMIS_Hold, MIS)

This will store the MIS # in the global field (and you can put the field off on some obscure rarely visited layout, such as an All Fields layout, where it won't clutter your screen). Now add the Perform External script that takes you to your B database. The B script, I see, includes a New Record Request. Right after that, place another line:

SetField(MIS, Constant::gMIS_Hold)

The constant relationship allows you to reach across to the global field in A and grab the contents. If there alreadsy is a relationship from B to A (as opposed to A to :, then use that one, no need for a constant relationship.

Now your field will get filled no matter what layout you happen to be on at the time.

Steve Brown

  • Author

Thanks, I didn't have the fields on the screen. I don't think it will be much problem having them there, I made sure they aren't editable.

Thanks a lot guys, I'm sure I'll be back with more questions : )

  • 2 weeks later...

Thank you, I have trying to do the same thing as ddreese for a while and when I read your solution it worked great. I really appreciate your help. Thanks again.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.