AnsweredAssumed Answered

Struggling with Server Side Scripts - Export

Question asked by JimZafrani on Jan 31, 2013
Latest reply on Jan 31, 2013 by philmodjunk

Title

Struggling with Server Side Scripts - Export

Your post

     Hello All, 

     I need to setup a server side scheduled script that exports one of the layouts to a file every day at a specific time. The script that I setup is:

      Go to Layout [ “SKUs 1 Basic” (SKUs) ]

Perform Find [ Specified Find Requests: Find Records; Criteria: SKUs::Attrib_3: “=:” AND SKUs::Qty_Avail: “25” ]

     [ Restore ]

Set Variable [ $filepath; Value:"filewin:" & Get ( TemporaryPath ) & "HDI-ATS-EXPORT.csv" ]

Export Records [ File Name: “$filepath”; Character Set: “Windows (ANSI)”; Field Order: SKUs::Product_ID

     SKUs::SKU

     SKUs::Attrib_2

     SKUs::Attrib_2_Name

     SKUs::Attrib_4

     SKUs::Qty_Avail

     SKUs::Retail

     SKUs::Price

     SKUs::Description

     Products::Class ]

     [ No dialog ]

      

     The script runs fine on the client but on the server, when scheduled, all I get are: 

      

      

     2013-01-31 12:10:00 Server Events Information Schedule "ExportSKUAvailability" has started FileMaker script "ExportInventory".
      
     2013-01-31 12:10:02 Server Events Information Schedule "ExportSKUAvailability" scripting error (4) at "ApparelMagic 10 : Startup : Allow Toolbars".
      
     2013-01-31 12:10:02 Server Events Information Schedule "ExportSKUAvailability" scripting error (4) at "ApparelMagic 10 : Startup : Move/Resize Window".
      
     2013-01-31 12:10:03 Server Events Information Schedule "ExportSKUAvailability" scripting error (4) at "ApparelMagic 10 : Window Control Browse : Adjust Window".
      
     2013-01-31 12:10:03 Server Events Information Schedule "ExportSKUAvailability" scripting error (401) at "ApparelMagic 10 : Authorizations Cleanup : Perform Find".
      
     2013-01-31 12:11:07 Server Events Information Schedule "ExportSKUAvailability" scripting error (4) at "ApparelMagic 10 : Window Control Browse : Adjust Window".
      
     2013-01-31 12:11:08 Server Events Information Schedule "ExportSKUAvailability" completed.

     Any ideas or help would be greatly appreciated! 

     Thanks, 

     Jim

      

Outcomes