djeans Posted September 29, 2017 Posted September 29, 2017 I'm trying to move an old database over to iOS with Filemaker Go, but have run in to a couple of problems. Everything functions for the most part, except there are some scripts that export records to a tab delimited file, then later re-import that data. On the iPad the script always fails saying that the file could not be created. The files on my Mac were set to export to a folder conveniently labeled "Import/Export" but with iOS you don't get access to the file system. Is there a work-around for this? Thanks in advance for any help.
TrulySimple Posted September 29, 2017 Posted September 29, 2017 You could try something like this. This is in an FM Go file to open images stored in containers. So I think the idea would be storing the path somewhere to open it later on your import. Cheers, Ben
djeans Posted September 30, 2017 Author Posted September 30, 2017 21 hours ago, TrulySimple said: You could try something like this. This is in an FM Go file to open images stored in containers. So I think the idea would be storing the path somewhere to open it later on your import. Cheers, Ben Thanks for the response. I wasn't able to figure out how to alter that to work for my. One of my current scripts has an export records step with file:$exportPath an tab separated text. and an import records step that is file:$exportPath It works on the mac, but I can't get it to work on the iPad. Originally the steps were file:ImportExport/orderexport.tab but I changed it because I couldn't create the ImportExport folder on an iPad
TrulySimple Posted September 30, 2017 Posted September 30, 2017 If the Export File step uses a Get ( TemporaryPath) to create the variable $exportPath and the Import File step is in a different script you would either be passing this local variable from the Export script into the Import script (if they are running one after another, which I think not) or you would store $exportPath as a global variable $$exportPath to pick it up for the import script when that runs. It is a little difficult to assist without seeing more of what is going on. I hope this helps.
djeans Posted September 30, 2017 Author Posted September 30, 2017 The export and import are part of the same script. I tried copying and pasting the entire script here, but couldn't do it for some reason. Let me try again. Allow User Abort [ On ]Go to Layout [ “LiquorCatalog” (LiquorCatalog) ] Show All Records Constrain Found Set [ Specified Find Requests: Find Records; Criteria: LiquorCatalog::Par: “>0” ] [ Restore ]Go to Record/Request/Page [ First ] Set Variable [ $exportPath; Value:Get (DesktopPath) & "OrderExport" ] Export Records [ File Name: “file:$exportPath”; Character Set: “Macintosh”; Field Order: LiquorCatalog::Barcode LiquorCatalog::LiquorName LiquorCatalog::Volume LiquorCatalog::Par LiquorCatalog::Vendor ] [ No dialog ] Go to Layout [ “LiquorOrder” (LiquorOrder) ]Show All Records Delete All Records [ No dialog ] Import Records [ Source: “file:$exportPath”; Target: “LiquorOrder”; Method: Add; Character Set: “Mac Roman”; Field Mapping: Source field 1 import to LiquorOrder::Sku Source field 2 import to LiquorOrder::Item Source field 3 import to LiquorOrder::Size Source field 4 import to LiquorOrder::Par Source field 5 import to LiquorOrder::Vendor ] [ No dialog ] Sort Records [ Keep records in sorted order; Specified Sort Order: LiquorOrder::Vendor; ascending LiquorCatalog::BinNumber; ascending ] [ Restore; No dialog ] Constrain Found Set [ Specified Find Requests: Find Records; Criteria: LiquorOrder::Order: “>.5” ] [ Restore ]Go to Record/Request/Page [ First ]
TrulySimple Posted September 30, 2017 Posted September 30, 2017 The part that jumps out at me from this script is that you are using Get(DesktopPath) & "OrderExport" I would try using Get ( TemporaryPath) instead as the iOS devices don't have desktops (as far as I know). Otherwise I am not sure the reason to export to tab delimited file then re-import what appears to be the same data into different fields. I am sure there must be a reason, yet not relevant if the file path fixes your issue.
djeans Posted October 6, 2017 Author Posted October 6, 2017 That almost works. It doesn't fail on the export step anymore, but the import now seems to import blank data. That is, after performing the import step, nothing is there. It works on the mac still, but not on the ipad.
Recommended Posts
This topic is 2605 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