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.

Automatic Perform Script on New Record?

Featured Replies

Note: The answer to this may be the same as that given to "spm" earlier today (see "Initiating Scripts") but I'm hoping there's something easier/cheaper.

----

I have created a script w/in Filemaker 4.0 which finds the data in a field ("thisgroup") on the previous record, copies it, and pastes it in a different field ("lastgroup") on the new record. This different field ("lastgroup") performs a calculation and enters the result in the original field ("thisgroup") on the *new* record. Then the next record to come along repeats the process. (All this is to accomplish a rotating designation of either 1, 2, 3, or 4 to each new record.It was the simplest means I could devise, though there may be a slick shortcut to get me beyond the problem noted below.)

The script works fine, either from the Script menubar or from a button I created to run it. The problem is it doesn't do it automatically upon the creation of a new record, and this is something I need, as the new records will be created using CDML tags on the web, and I need the reply page to contain some of the field data generated by the script. I've tried including a script tag in my CDML, but it doesn't work. I don't care if the automatic start is controlled by the HTML/CDML interaction, or within FileMaker, but I'm stumped as to how to make it happen.

Any ideas?

The script is pasted below, followed by the script tag I've used in my HTML page. Maybe someone can tell me where I've missed the boat.

Script: Perform Script ["lastlookup"] Enter Browse Mode [] Go to Layout ["master"] Page Setup [Restore, No dialog] Go to

Record/Request/Page [Previous] Copy [select, "thisgroup"] Go to Record/Request/Page [Next] Paste [select, "lastgroup"] Exit Script

Tag (inside Form /Form tags) on HTML page <INPUT TYPE="hidden" NAME="-Script" VALUE="lastlookup">

Peter, your form action code "<INPUT TYPE="hidden" NAME="-Script" VALUE="lastlookup">" looks ok.

Where I'm getting confused is your script "lastlookup". You say you have pasted the script and it begins"Script: Perform Script ["lastlookup"] Enter Browse Mode []..."

Are you sure the -script value="lastlookup" starts "Perform Script ['lastlookup']"? Seems that the Perform Script step is a redundancy. But I could be wrong.

Peace

Keith M. Davie

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.