Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

Recommended Posts

Posted (edited)

I have a script to import files into a table which I would like to automate thru filmmaker script schedules I setup the schedule and it runs as it should but it fails, so I tried to run script on server thru filemaker pro but it also failed so I simplified the script to 2 lines which also failed. When the script is ran locally it works fine but not on Server it returns error 100 which indicates file not found.

The files are located on the C drive of the server under a folder called Dealersocket, after several attempts using direct, network, and variable paths and online research no matter what I try I can't get it to work properly. I'm hoping someone can assist me.

 

#===============  here is the import script =======================

Set Error Capture [ On On ]

Set Variable [ $file ; Value: "filewin:/C:/Dealersocket/InProgress.csv" ]

Import Records [ With dialog: Off Off ; Table: InProgress ; “$file” ; Update; Windows ANSI ]

 

# =============== PSOS =========================

Set Error Capture [ On On ]

Perform Script on Server [ Specified: From list ; “Import Inventory” “Import Inventory” ; Parameter:       ; Wait for completion: On On ]

Set Variable [ $error ; Value: Get ( LastError ) ]

Set Variable [ $results ; Value: Get ( ScriptResult ) ]

If [ not $error and $results ≠ False ]

Set Variable [ $$SERVER.RESULT ; Value: Get ( ScriptResult ) ]

Else

Show Custom Dialog [ "Error" ; "SOB I encountered error " & $error & " and the script results are " & $results &"." ]

End If

 

No matter what I do I always get error 100

Edited by Lou
Posted (edited)
48 minutes ago, Lou said:

The files are located on the C drive of the server under a folder called Dealersocket, after several attempts using direct, network, and variable paths and online research no matter what I try I can't get it to work properly.

As you can see in the help:

Quote

 

When running a script on FileMaker Server or FileMaker Cloud:

  • Any specified file must be in the Documents folder, the temporary folder, or a child folder of either of these folders. 

 

https://help.claris.com/en/pro-help/content/paths-in-server-side-scripts.html

 

 

 

Edited by comment
  • Like 1
Posted

it worked moved files to the document folder on the server 

 

thank you

  • 1 month later...
Posted
On 5/10/2024 at 5:26 AM, comment said:

As you can see in the help:

Quote

 

When running a script on FileMaker Server or FileMaker Cloud:

  • Any specified file must be in the Documents folder, the temporary folder, or a child folder of either of these folders. 

 

https://help.claris.com/en/pro-help/content/paths-in-server-side-scripts.html

 

But if I would store a .csv file, on the servers temporary folder - could I then make container field store it's actual content first on client side, store it in a not referenced container, and then on PSOS side transfere it to another container field wich is referenced to a legit folder on serverside, and then perform the import? 

Chatbot (AI) have given me these hints:

Quote

When performing imports in a FileMaker Perform Script on Server (PSOS) environment, there are several considerations to keep in mind to ensure the import process runs smoothly and efficiently. Here are some key points to take care of when importing data in a PSOS environment:

 

1. **File Paths:** Ensure that the file paths used in the import script are accessible and valid in the PSOS environment. Use relative paths or container fields to reference files to avoid issues with file paths on the server.

 

2. **Data Source:** Verify that the data source for the import is accessible from the server where the PSOS script is running. This includes checking network connections, permissions, and file sharing settings.

 

3. **Error Handling:** Implement robust error handling in the import script to capture and handle any errors that may occur during the import process. Use error capture steps and script triggers to manage errors effectively.

 

4. **Performance Optimization:** Optimize the import script for performance in a PSOS environment. This includes minimizing the amount of data being imported, using efficient import methods, and avoiding unnecessary script steps.

 

5. **Security:** Ensure that the import process adheres to security best practices, especially when importing data from external sources. Validate and sanitize incoming data to prevent security vulnerabilities.

 

6. **Testing:** Thoroughly test the import script in a PSOS environment to identify any potential issues or bottlenecks. Test the script with different data sets and scenarios to ensure its reliability and efficiency.

 

7. **Logging and Monitoring:** Implement logging and monitoring mechanisms to track the progress of the import script and capture any relevant information or errors. This can help in troubleshooting and debugging issues that may arise during the import process.

 

By taking care of these considerations when performing imports in a FileMaker PSOS environment, you can ensure a smooth and efficient data import process that meets your requirements and maintains the integrity of your FileMaker solution.

--sd

Posted

Sorry, I don't understand your question.

It might be better to start a new thread and explain the problem you are trying to solve before discussing possible solutions.

---
P.S. My (limited) experience with AI is that it doesn't have a clue when it comes to Filemaker (not that the answers in more popular languages are particularly good, but at least they tend to be correct, even if overcomplicated). This is hardly surprising, considering the body of knowledge it has at its disposal.

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.