Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4779 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I've created a scripted process by which a snapshot link (SNL) is created manually using a series of custom functions. I'm doing this because the creation of the SNL needs to happen server-side, but the resulting SNL is sent to remote users. A native SNL created server side stores a local path to the file which then breaks for those not on the same network.

The process works great and I do get a resulting SNL file, but here is the problem..

I need to use a line break to separate the record ID's. I've tried to use the pilcrow character, Char (13) and Char (10), but the resulting SNL file does not respect these characters. If you open the resulting file with a text editor and simply replace the line breaks between each of the ID's, the file works. I've also played with various encoding options both with the global temp field where I store the XML (pre-export) and with the export encoding as well, but no dice. I'm hoping I'm just missing something.. I have attached a demo file and a movie showing what I mean by replacing the line breaks which then works. Any thoughts?

snapshotlink.mov

CreateSNL.fp7.zip

Posted

When you export as tab-delimited, any in-field carriage returns are converted to vertical tab characters. You could export the global field's contents - but then the file's encoding will be UTF-16 (which may be fine for Filemaker, or not).

Have you tried exporting as XML, using a suitable XSLT stylesheet?

Posted

Great suggestion..

I modified the script so that it exported the field contents.. The only other modification required was to change the header row of the XML output so that it was also encoded with UTF-16. Meaning, change this:


<?xml version="1.0" encoding="UTF-8"?>



 

To this:

 



<?xml version="1.0" encoding="UTF-16"?>

It works beautifully now.. Thanks a million!!!

I've attached the working file here:

CreateSNL_fixed.fp7.zip

Posted

Ah.. heck.. spoke to soon....

Export Field Contents is NOT a supported server-side script step.. It seems the only option then must be to export as XML with an XSLT stylesheet, but I'm not at all familiar with creating XSLT stylesheets from scratch. Any advice about how to go about creating a stylesheet to do what I need?

  • Newbies
Posted

It's pretty trivial to write an XSL transform to flip out the paths node [of a native snl] with whatever you want. If your server is Mac OS, it's also trivial to perform the transformation via shell script (and maybe on Win too, I just haven't tried it.)

This topic is 4779 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.