Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5647 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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!

Posted

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

Posted

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.

Posted

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.

Posted

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.

This topic is 5647 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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