Mandu Posted April 1, 2008 Posted April 1, 2008 A while back someone showed me a great way to script letting the user locate a file using the OS Open File dialog, and then use that choice throughout the rest of the script. It goes like this: o Define g_SourceFileReference as a global container o Insert File [ Reference; g_SourceFileReference ] o Set Variable [ $filePath; GetAsText(g_SourceFileReference)] The Insert File step throws up the OS Open dialog, allowing the user to navigate to any file on the file system. GetAsText converts the "reference" to a well-formed path name. Now you can use $filePath as you like, as many times as you like. I use this when writing an upgrade script, which imports all the tables from a previous copy of the db. But I wrote the same thing tonight, for a new solution, and it doesn't work! The Insert File step throws an error 102, field is missing. What? Well, I googled up one suggestion, to delete and recreate the field. Hey, I deleted and recreated the entire table, and I still get 102. What could be going on here? Thanks, Chap
Mandu Posted April 1, 2008 Author Posted April 1, 2008 Arggh. Never mind - I just remembered why I never use Insert... commands - the field has to be visible on the current layout!!
Recommended Posts
This topic is 6082 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 accountSign in
Already have an account? Sign in here.
Sign In Now