I believe the way it works now is a feature. That’s why I went to considerable trouble to make it work that way. The File > Export > Text (CSV) feature uses the exportlinevisiblecells( function. This makes it super easy for non-technical users to export selected fields. Also, it means that the export matches the display of the data sheet. I think it could be an unpleasant surprise if the export contained data that isn’t visible in the data sheet. (Of course in your case, the surprise was the other way.)
I don’t think a dialog is a good idea. If you want to export all fields, then choose Field > Show All Fields before you export.
The way it works now makes the export operation consistent for records and fields. If you want to export all records, you choose Select All before exporting. If you want to export all fields, you choose Show All Fields before exporting. If you want the data sorted a certain way you do that before exporting, etc. Otherwise you would need a dialog with a zillion options. I hope we can agree that wouldn’t be a good plan.
While I agree that the features that Panorama offers are amazing, sometimes they are the unexpected features that can bite us.
Today I did an export of a database because I needed a safe place for data to reside while I mucked with stuff that was acting wonky. When I did the export, the fact that it happened instantaneously shocked me and it was only then that I realized it had only exported 11 records instead of 55,000 records.
What I believe mdj was asking for, was a dialog that might say things like 11 records of 55,000 being exported with 12 of 18 fields. That info, along with an OK button, will not allow for someone to think they have safely put aside info only to later find that they just lost essentially all of their work. It is not an opportunity for options but instead just information.
What I believe mdj was asking for, was a dialog that might say things like 11 records of 55,000 being exported with 12 of 18 fields.
I understood the request.
I was taught back in 1984 that that sort of modal interruption to flow is bad design, and that whenever possible, modal operation should be avoided. I know some people like modal interruptions, but I’m still a fan of the original Macintosh human interface guidelines, and I think an extra stop here is not a good idea.
I was going to say that what I think could be good here would be a notification, which would not interrupt the flow. So I went to take a look at the code and guess what – it already does display a notification with the number of records exported. And if you click on the notification, it reveals the exported file in the Finder. That wouldn’t have solved Mark’s problem, but it should have solved yours. Perhaps you have do not disturb turned on, or you haven’t enabled notifications in Panorama. I’ve led the horse to water, but I can’t make it drink.
The notification code could be modified to display the number of fields as well as the number of records, especially if not all fields are included. I’ll look into it.
While that will work, is there a “re-hide the fields you previously had hidden” option?
I know I could write a procedure to save off the currently hidden fields and restore them … but, I might as well just add my own “ExportEverything” menu item. It’s cleaner!
Anyway – thanks for (both of) your insights. Always helpful!
While that will work, is there a “re-hide the fields you previously had hidden” option?
You bet - Edit > Undo Show All Fields
but, they’re better than losing data.
Now c’mon - there’s no “lost” data. It just wasn’t exported. The data is still in your database, right where you left it.
If you print when fields are printed, those fields won’t be printed either. You might not notice until you walk to the printer.
Maybe the solution is to get rid of the feature for hiding fields. Just kidding.
By the way, a warning dialog is not a guarantee of not losing data either. Decades ago, we had a sales guy working for ProVUE who changed a field from text to numeric. Panorama warned him with an alert that data might be lost, and he clicked Ok (this was Panorama 2, I think, which didn’t have Undo for this). Then he was upset that data was lost. “Why didn’t it warn me?” he complained.
Long, long ago, there was a viewpoint along the Oregon coast where you could see the ocean, and if you were lucky, migrating whales. There was a sign warning, “Do not get close to the edge”. But from time to time, some people wouldn’t think the sign applied to them. And there’d be an … incident.
The department involved then put up a cyclone fence, many feet back from the edge (it wasn’t a steep cliff, just a steep angle to the sand below).
Now ALL stoppers by have to take in the view, and take photos, through a wire fence.
One thing they don’t teach you in programming school - you learn it through experience - is that you will always be wrong. No matter how much you try to “appease the masses” while maintaining as close as possible to development guidelines and policies, which give the program stability over various system updates, there will always be an audience for whom your bright idea isn’t as illuminating.
Seems to me that “Hidden fields aren’t exported” is pretty consistent with “unselected records aren’t exported”.If your routine selects your records, exports, then returns to a previous selection (i.e. ALL) state, that would be a natural place to include the selection of desired fields along with returning them to their previous state. One-stop shopping.