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 Field Contents" in script

Featured Replies

Using "Replace Field Contents" to replace with a calculated result works fine manually. But when I place it in a script and try to specify the same calculation, it always gives me the error "The specified table cannot be found", regardless of what table I have selected. What am I doing wrong?

Thanks!

Make sure you have a:

- "go to layout" (to a layout based on the table that has that field)

- and a "perform find" on the records you want to run replace on (unless you’re doing all, in which case you want a "find all" script step)

prior to your "replace field contents" script step..

  • Author

Actually, I'm getting the error message while writing the script; I'm unable to save it, much less run it. The "Replace Field Contents" dialog that opens when I click the lower of the two "specify" buttons will not allow me to save the calculation I am using, even though that same calculation works manually.

Well, will you post the calculation or do you just prefer wild guesses?

  • Author

The calculation is

_coll & "; " & _synt & "; " & _Objects & "; " & _M

in which the four items beginning with an underscore are names of fields in the current layout. As mentioned, this string-concatenation works when I use Replace Field Contents manually. I have indeed been using Go to Layout as the step before Replace Field Contents in the script, as Ben Goldstein suggested.

I've just found that I can avoid the error by including the name of the layout before each field-name:

Currentlayout::)_coll & "; " & Currentlayout::_synt & "; " & Currentlayout::_Objects & "; " & Currentlayout::_M

So the problem is solved. But it's curious to me that so much more specificity is needed in the script than in manual operation of the same command.

Thanks for your help.

Those are not layout names, but table occurrences names. You need these in a script, because a script does not have an inherent context. For example, there could be a Name field in two related tables, so a reference to "Name" alone would be ambiguous.

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.