Extra Fields in Import add Fields to Existing Database

While experimenting to find the best way to format text coming from a Panorama 6 database, I unexpectedly ruined my Panorama X database. My Pan 6 file has paragraph breaks in many of the fields so I was trying to disable them and used replace(exportline(),¶,"¶").

When I attempted to import the file it came through as one record. Panorama X added hundreds of new fields to accommodate it without warning.

Deleting the extra fields was far too tedious a task so I reverted to a backup from hours earlier. I lost some work but had no serious harm.

In a new database from the text, fine. But in an established database it would be good to have a warning about adding fields, or as in Pan 6 a message that extra fields in teh data were ignored.

While not wanting to minimize the problem you recognized of adding fields without prior authorization, in hindsight :wink: would a loop of DeleteField have worked efficiently to remove the newly added fields?

Absolutely, I just preferred to skip the quick coding for that in favor of a revert since I wasn’t positive there weren’t other issues.

How did you do the import? If thru a wizard, then you could just Undo.

If you wrote a program and used the importtext statement, that has an option to determine whether new fields are added or not. Also, by adding one line to your program you could enable Undo, and your experience shows why that is usually a good idea!

I used Import Text File Into Current Database from the File menu. That opened the window for matching fields. I knew right away that things didn’t look quite as expected but saw no harm in seeing how it dropped into the database. It imported as one record, so I went back to my Pan 6 file to continue working on the format for the export. It wasn’t until later - too late for an Undo - that I discovered all of the new fields and, in all honesty, I assume that it was on that import that they were added. It was the only effort that didn’t have multiple records.

I’ve been working on a procedure to import data into this database, and if it goes into use, it’ll be by many people without Author access to the Pan 6 database. So I’ve been through the ImportText statement somewhat thoroughly but it still requires experimentation to find the simplest way to format the text in the first place.

I can handle all of that. The reason for my post was to lobby for a warning that fields are being added (or ignored) rather than having it just happen.

The idea of warnings vs undo has come up a number of times on this forum, and I assume that it will come up again in the future.

Previous versions of Panorama had very limited Undo capabilities, and it would warn you before doing something that might destroy data.

According to Apple’s guidelines, that’s not the way to do it. The proper way to do it is to not give warnings, but to allow users to reverse any operation if they find that it doesn’t do what they expect. I think there are two reasons for this – first, warnings are disruptive to the flow of the program, and two, users tend to blow past warnings without paying attention.

I realize that not all users agree with Apple on this subject. However, I am going to stick with the UX experts on this (and btw it’s not just Apple, pretty much all UX experts agree with this). So unless an operation cannot be undone, Panorama does not display a warning before performing the operation.