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.

Help with a script that will run between two database

Featured Replies

HI

i want to have a script that will open database #2 to layout "a" and when the user complete the input data.

The database #2 will close and return to date base #1.

The problem is the user enters database #2 layout name "a" straight ( to the same layout) when he finishes with the layout he should stay on database #2 and not run to database #1.

can some one help please ?

Thank you

Dani

Hi Dani,

All work should be handled in the same file - no need to open and close other files at all. :^)

If you mean working in single file but switching to layouts which are based upon two different files or tables then that is different. When you say 'database' do you mean file or table?

  • Author

Hi i mean file

Again, there is never a need to move between files in this way. By adding a file reference from the other file and creating layouts in ONE file, all work can happen there. This will greatly simplify your scripting.

It would also help if you use real names instead of #1 and #2 so we understand the context of the problem.

If a single script can have dual purpose - sometimes exit on a new layout and sometimes return to the prior layout then you can either ask the User (custom dialog) which they want, or you can use script parameter and depending upon certain conditions when they click the button, script can proceed depending upon which button they select. Or you can have the script exit once it is on the new layout if a User clicks another button (which would halt the script).

Understanding the User process here would help. I have no vision of what the User is doing or experiencing to provide more in-depth response. :^)

  • Author

I have a file name company that has company name & contacts people in the company.

second file is sells.

when the user is in sells and he want to add a new company or contacts the script will open company & contacts file.

  • Author

The problem I have is the i can't copy the layout to sells file because all the script i have in company.

That is way i want to find a way that filemaker can get how the file was open.

Hi Dani,

No prob with two files - I mention it because it makes things easier. Going back to your opening statement of "i want to have a script that will open database #2 to layout "a" and when the user complete the input data. The database #2 will close and return to date base #1."

I am still unclear - my fault. So a User is in Sales. Why? Create a new sale? And THEN they realize there is not a Contact record yet and so you want them to create the new contact record and then return to the sales record? How do you handle navigation normally? Do you have buttons to each layout (or section) as buttons across the top? Or do you use custom menu?

Do you have the New Contact script in your Sales file or your Contacts file? You can create a script in Sales which calls the sub-script New Contact in Contacts and if you end your script with ANYTHING, you will be returned to this Sales file for the script to finish. It can be simple Enter Browse Mode.

I prefer than Users find the Contact and then use button Create Sale on their layout.

You can also just open new window, let User enter data and close it again. But having User select (or create) Contact first is the best way to handle it.

Edited by LaRetta

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.