AnsweredAssumed Answered

Copy and paste of calculations with missing items fails when it also contains quoted comments

Question asked by nickorr on Mar 15, 2011
Latest reply on Mar 16, 2011 by TSBear

Summary

Copy and paste of calculations with missing items fails when it also contains quoted comments

Product

FileMaker Pro

Version

11v2

Operating system version

Either

Description of the issue

When you copy and paste calculations ( inside other items like fields or scripts) into new solutions, and one of the items in the calculation is missing from the destination, the calculation gets commented out.  However, if the calculation also contains comment strings inside calculations ( perfectly valid ), then the calculation is just left blank.

Steps to reproduce the problem

Create a new File, and add a Custom Function called "MyCF".
Create a Single Script with a single Step that sets a variable and uses the calculation :

"Test imbedded /* in quote" &
// Test imbedded /* in comment line
MyCF

Save the script, and then copy the Script to another file that doesn't have the MyCF function in it.

Expected result

It should comment out the entire calculation.

Actual result

You end up with a blank calculation and an error in the import.log file.

Exact text of any error message(s) that appear

2011-03-15 17:02:18.003 +1100     Untitled2.fp7     0     Import of scripts from clipboard started
2011-03-15 17:02:18.042 +1100     New Script::1::Set Variable     106     Table referred to in the calculation “"Test imbedded /* in quote" &
// Test imbedded /* in comment line
MyCF” is missing.
2011-03-15 17:02:18.046 +1100     New Script::1::Set Variable     1205     Unknown Error: /*"Test imbedded /* in quote" &
// Test imbedded /* in comment line
MyCF*/.
2011-03-15 17:02:18.066 +1100     New Script     0     script steps imported : 1
2011-03-15 17:02:18.067 +1100     Untitled2.fp7     0     scripts imported : 1
2011-03-15 17:02:18.085 +1100     Untitled2.fp7     0     Import completed

Workaround

Not any that I can see.

Outcomes