Using extracted file paths with Import Records script step
I'm trying to setup a script to allow the user to select their old file from within a new file and then import all records from the old file into the new file as part of a solution upgrade script. I saw the below quoted text in an answer to another post and want more details on how to do the part in red:
"...You can write a script that imports all the data from every table in the old file into tables in the new file. This same script can also update any serial number settings to the correct next serial number values. With a bit of creativity, you can use a container field and Insert Field so your script can ask the user to select their original file and then uses that insert by reference to extract the path and filename of the original file for your update script."
- How do you extract the file path after the user selects the file with the Insert Field into a container field?
- Once you have the path, how do you use it with the Import Records script step?
- How do you set up mapping in the Import Records script step if you can't see the source fields?