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.

Replace sub-script isn't working

Featured Replies

I've created a script that imports a Juno addrbook.nv file and exports it in MS-Outlook Express address book format. The script performs 8 sub scripts the 3rd script of which isn't working when performed from the main script but works great if I run each script individually. The script not working looks like this:

Go to record [first]

Replace [No dialog, "RecordID", "Serial numbers"]

Any ideas?

Put a "beep" or "show message" step to see if the script ever gets called. My guess would be that you're not running this script as a subscript, you're probably calling another one with a similar name.

  • Author

It's a mystery to me. The sub-scripts appear not to be running. I added a beep and made sure the Perform sub-script box was checked. No beeps. Anyways I gave up and just used loops instead. Thanks for your input.

Make sure the RecordID field is on the layout when you run the replace else it won't be executed

I had the same problem in my solution, i solve to problem with this scripting.

set errorcapture [on]

Replace [No dialog, "RecordID", "Serial numbers"]

if["status(currenterror)<>0

Replace [No dialog, "RecordID", "Serial numbers"]

end if

Maybe these will work for you.

Sorry Bert I don't understand your script. It says: perform a replace, if there is an error perform the replace again. What's to suggest the second attempt at a replace will be successful?

That

The Replace command only works if the field is on the current layout.

Was the database multi-user with another guest using it? That would create locked records, and locked records cannot be modified so the Replace step fails.

Other ways of doing it include using a loop instead of replace, using Set Field [] on each record and checking for errors. A warning message can be created to indicate that one or more records could not be updated.

It'd look something like:

Set Field [gReplaceError, 0]

Go to Record [first]

Set Error capture [on]

Loop

Set Field [whatever, whatever]

If [status(CurrentError) <> 0]

Set Field [gReplaceError, 1]

End If

Go to Record [next, exit after last]

End Loop

If [gReplaceError = 1]

Show Message ["One or more records could not be updated."]

End If

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.