Copy/Pasting "Import Records" script step breaks the option "Arrange by"/"matching names"
Operating system version
Description of the issue
When you copy an "Import Records" script step, the option "Arrange by" is not copied to the clipboard, and thus is incorrect when pasted back into a script.
Please give this bug a very high priority!
- BECAUSE it is an extremely important, widely-used and data-critical function!
- BECAUSE it causes exceptional problems:
- BECAUSE the error is NOT reported in the import.log
- BECAUSE the error cannot be seen in the script editor without opening the import options
- BECAUSE a noticeable error first occurs in the data when the table's fields have been edited/renamed/added, deleted, etc.
- THUS => testing such scripts immediately after programming *DOES NOT REVEAL THE ERROR!*
- THUS => the effect of this error is first discovered usually long after the database has been released and distributed
- BECAUSE developers do not expect copy/paste to fail like this IN SUCH A BIG WAY
- BECAUSE, if it goes unnoticed (which is likely), the error leads to (very) corrupted data
- BECAUSE (in non-data-separation model databases) it is THE FUNCTION for updating customer data in a new release. (i.e. you likely have at least one import record script step per table)
Steps to reproduce the problem
1. Create a database and add some fields
2. Create some data
3. Export the records to a second fmp12 file.
4. Create a script to import the file back, selecting Arrange by "matching names"
5. Duplicate the script step + look at the options.
6. Copy + paste the script step + look at the options.
I would expect to see "matching names" in the pasted script step options.
I only see "matching names" in the duplicated script step, BUT IN THE PASTED SCRIPT STEP I SEE ONLY Arrange by Last Order.
Exact text of any error message(s) that appear
After pasting correct the import records script step option "Arrange by" by hand.
NOTE: Because the above description of the workaround may prompt the reader to imagine a workaround time of less than 1 minute, I should like to sketch a more real-life (and only slightly over-exagerated) view of the workaround which gives a much more realistic feel for the time and business costs that may be caused by this bug:
A. Discover that a Problem Exists
1. Develop new super-duper functionality in your database and deliver to happy customers.
2. Wait until a customer calls (or possibly many customers call) angrily to say that all of the invoice-table-data is totally screwed up,
B. Identify the Cause of the Problem
3. Spend several hours in a remote support session with the customer analyzing why/how the data is screwed up.
4. Spend another couple of hours searching google/fm knowledge base/forums, etc. for similar problems/possible known causes.
5. Maybe post your problem to your favorite FM-forums.
6. At some point ...hear/learn/discover/work out that the cause of the problem is this copy/paste bug.
C. Correct the Specific Problem in your Master Version
7.Create a DDR and make an analysis of the 32-file filemaker solution with Cross Check, Inspector or Base Elements.
8. Locate all the scripts which import invoice line-item records.
9. Double click every such script step to check if the option is wrong.
10. Where the option "Arrange by" is broken (which may not be easy to identify) correct it
D. Code Review+Test the new solution
E. Correct the General Problem in your Master version
... If you are smart: repeat this procedure pro-actively for all other potentially broken import records script steps in the solution.
F. Code Review+Test all changes
G. Correct the Corrupted DATA in your Master & Test versions of the database
H. Correct the Specific and General Problems in Customer versions
n. Make a list of all broken script steps
n+1. Identify all customers whose versions of the database contain the fault
n+2. Correct all broken steps in all delivered databases
I. Correct all corrupted customer data - WHERE POSSIBLE*
(*and where not possible potentially lose customers)
n+3. …Locate non-corrupt data (e.g. in a previous backup)
n+4. …Export data to Desktop
n+5. …Import data from Desktop
n+6. …Write script to correct IDs (or accidentally forget, and next week deal with the problems that have started to appear due to duplicated IDs in the database)
J. Avoid the problem happening again
n+20. Document the problem & cause in the company's developer knowledge base
n+21. Update the company's Wiki > Training documentation
n+22. Train the topic in the weekly programmers training session
This view of the workaround gives a much more realistic view of the time+effort required to discover, find, identify, solve and ban the problem:
Total workaround cost >>> 1 day