AnsweredAssumed Answered

Container export, file import, and paths

Question asked by PaulSeabright on Sep 19, 2018

I've just solved a problem that's taken me a while to get my head around, so I thought I'd post the result here.  It's probably not news to may, but hopefully, it will help some.

 

The original post that preceded this one is here and it has lots of good information from the likes of steve_ssh, user19752 and bigtom.

 

The 'issue' was around paths used by PSOS, BE_ExportFieldContents and ImportRecords.  I needed to grab a csv file of customer details from a container field and import it into the the customer table.  I wanted to do this as a PSOS because it was going to be much faster. It needed to run in a Windows and MacOS environment.

 

Server side scripts can only access files in two locations :- The Temp folder and the Documents Folder. More details here.

 

I wanted to use the Temp Folder because, "In server-side scripts, each script runs in its own session; once the script is completed, the session terminates and the temporary folder is deleted." Help article here.

 

BE_ExportFieldContents uses OS file paths - FM file paths will not work.  Reference here.

 

These are the script steps that gave me the result I needed.

 

Outcomes