bigtom

WebDirect Exprot Field Contents

Discussion created by bigtom on May 29, 2014
Latest reply on Jun 18, 2014 by dtvconsult

I read the bulletin about WD and Safri. That is not the issue here. I am testing with OSX and Firefox.

 

This works fine with Get(DesktopPath) & "/image/" & tablename::fieldname & "-1.jpg" in OSX but I have one user that insists on running a PC over WebDirect. The following script is doing some odd stuff with WD. There are a series of containers (12) that may contain images. The script checks each container individually and exports the contents.

 

I understand there is a failure of WD to export files sequentially as detailed here. If the record only has five images it will generate a popup for only the fifth image as expected. However, the .jpg is not being added. For example if the prpending field value is 2034 I get a file "2034-5" and not "2034-5.jpg". It the "." a reserved character? When I add the file extension to the file manually it shows as an image and all is fine, but that is not the workflow anyone is looking for.

 

If [not IsEmpty (tablename::image_1)]

Set Variable [$path;

Choose ( Abs ( Get ( SystemPlatform ) ) -1 ;

 

/*MAC OS X*/

Get(DesktopPath) & "/image/" & tablename::fieldname & "-1.jpg"

;

/*WINDOWS*/

"filewin:"& Get(DesktopPath) & "/image/" & tablename::fieldname & "-1.jpg"

)]

Export Field Contents [tablename::image_1; "$path"]

End If

 

 

If [not IsEmpty (tablename::image_2)]

Set Variable [$path;

Choose ( Abs ( Get ( SystemPlatform ) ) -1 ;

 

/*MAC OS X*/

Get(DesktopPath) & "/image/" & tablename::fieldname & "-2.jpg"

;

/*WINDOWS*/

"filewin:"& Get(DesktopPath) & "/image/" & tablename::fieldname & "-2.jpg"

)]

Export Field Contents [tablename::image_2; "$path"]

End If

 

 

Get(DesktopPath) is not supposed to be supported but it seemed to find the correct path for the file anyway.

 

So, how can I make this more friendly?

 

Obviously I need a script that will determine WD before the FMP scripts get to going. If (Get ( SystemPlatform )=4) Perform a different script.

 

I am stumped with finding a good way to export the files sequentially via WD and keep the proper extension and get to the proper path.

Outcomes