Jump 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.

Featured Replies

Lacking cut'n'paste, I have been trying to figure out how to use Import script to its best advantage. Any tips and tricks would be greatly appreciated.

For example, I paid someone to add some error-checking code into my scripts. He emailed the modified file to me... I was making my own changes to that file as well, but not in the same scripts. Now what?

1) I can just look at his code and manually add it to mine. Since the error checking code was more than half the scripts, and there's no cut'n'paste, that seemed no good.

2) I can delete my script, import his, and rename his to what mine was named. Easy, but all the calls to that script will point to "unknown". I have to go find all the calls and change them to the new script by the same name. Ouch! (This includes external calls from other files, calls from buttons, and calls from other scripts.)

3) I tried doing #2 in a variety of sequences, hoping one of them would cause FileMaker to invoke the logic it has to use a script by the same name, rather than strictly using the script number. But nothing helped.

Is there any effective way to accomplish this? If not, this has got to be in the top 5 of worst things about FMP. It makes it a maintenance nightmare!

While there are some tricks to get script information OUT of FM, I know of no way to cut and paste or such. In the old, old days, one of my associates worked on a system in Frontier (QuicKeys like scripting) to import scripts, a pretty arcane approach. Your best bet is to apply some development methodology and don't modify a script someone else is working on or break it into subscripts.

As to #3, it might be worth some experiments. If you add some extra dummy scripts to the file for use when another person is developing AND don't add, delete, or change the order of scripts during development, import might hook up ok. I don't know the exact answer, but from casual observation of script behavior, it's worth a shot.

It's my belief that all these sorts of features will come to FM in time. My favorite is I want folders in Define Fields. wink.gif.

-bd

Hi Brian,

The lack of cut'n paste is, as you say, one of FMPs less attractive aspects, and it's to be hoped that as LiveOak says, it will be fixed sooner rather than later in an upcoming version. The ability to import scripts was only introduced with version 5.0 - and though hopelessly inadequate, it is nonetheless a big step forward, as I'm reminded every time I have to do scripting for one of several clients who are still struggling along with v4.1.

Anyway, to get to the point, it's likely that the best solution for your current predicament is to import copies of the scripts with the error checking code, delete everything else but the error check sequences, and then call them as sub-scripts from within your existing scripts. The original copies will be a point of reference as to what the total sequence and the logic is.

A serendipitous consequnce may be that opportunity may exist to re-use some of the error checking sequences for more than one existing script, in which case the 'modularity' which will result may pay off in a sense.

HTH! smile.gif

Create an account or sign in to comment

Important Information

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

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.